mirror of https://github.com/OpenVidu/openvidu.git
ov-components: refactor leave button implementation for improved template handling
parent
6da901e7bb
commit
4654c48f22
|
@ -199,9 +199,6 @@
|
|||
|
||||
<!-- Leave session button -->
|
||||
@if (showLeaveButtonDirect()) {
|
||||
@if (toolbarLeaveButtonTemplate) {
|
||||
<ng-container *ngTemplateOutlet="toolbarLeaveButtonTemplate"></ng-container>
|
||||
} @else {
|
||||
<button
|
||||
mat-icon-button
|
||||
(click)="onLeaveClick()"
|
||||
|
@ -212,4 +209,7 @@
|
|||
<mat-icon>call_end</mat-icon>
|
||||
</button>
|
||||
}
|
||||
|
||||
@if (toolbarLeaveButtonTemplate) {
|
||||
<ng-container *ngTemplateOutlet="toolbarLeaveButtonTemplate"></ng-container>
|
||||
}
|
||||
|
|
|
@ -223,13 +223,12 @@ export class ParticipantPanelAfterLocalParticipantDirective {
|
|||
}
|
||||
|
||||
/**
|
||||
* The ***ovLeaveButton** directive allows you to replace the default leave button with a custom template.
|
||||
* Use this directive to provide your own button, confirm dialogs, or any custom leave logic while keeping
|
||||
* the internal leave flow intact.
|
||||
* The ***ovLeaveButton** directive allows you to inject a custom leave button template. You can use the toolbarLeaveButton = false for
|
||||
* replacing the default leave button with your custom one.
|
||||
*
|
||||
* Usage example:
|
||||
* ```html
|
||||
* <ov-videoconference>
|
||||
* <ov-videoconference [toolbarLeaveButton]="false">
|
||||
* <ng-container *ovLeaveButton>
|
||||
* <button class="my-leave-button" (click)="customLeave()">
|
||||
* Leave meeting
|
||||
|
|
Loading…
Reference in New Issue