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 -->
|
<!-- Leave session button -->
|
||||||
@if (showLeaveButtonDirect()) {
|
@if (showLeaveButtonDirect()) {
|
||||||
@if (toolbarLeaveButtonTemplate) {
|
|
||||||
<ng-container *ngTemplateOutlet="toolbarLeaveButtonTemplate"></ng-container>
|
|
||||||
} @else {
|
|
||||||
<button
|
<button
|
||||||
mat-icon-button
|
mat-icon-button
|
||||||
(click)="onLeaveClick()"
|
(click)="onLeaveClick()"
|
||||||
|
@ -212,4 +209,7 @@
|
||||||
<mat-icon>call_end</mat-icon>
|
<mat-icon>call_end</mat-icon>
|
||||||
</button>
|
</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.
|
* The ***ovLeaveButton** directive allows you to inject a custom leave button template. You can use the toolbarLeaveButton = false for
|
||||||
* Use this directive to provide your own button, confirm dialogs, or any custom leave logic while keeping
|
* replacing the default leave button with your custom one.
|
||||||
* the internal leave flow intact.
|
|
||||||
*
|
*
|
||||||
* Usage example:
|
* Usage example:
|
||||||
* ```html
|
* ```html
|
||||||
* <ov-videoconference>
|
* <ov-videoconference [toolbarLeaveButton]="false">
|
||||||
* <ng-container *ovLeaveButton>
|
* <ng-container *ovLeaveButton>
|
||||||
* <button class="my-leave-button" (click)="customLeave()">
|
* <button class="my-leave-button" (click)="customLeave()">
|
||||||
* Leave meeting
|
* Leave meeting
|
||||||
|
|
Loading…
Reference in New Issue