copy not started jitsi

This commit is contained in:
_Bastler 2021-09-02 18:53:47 +02:00
parent a42ed320f0
commit 9b3d11a4b1
2 changed files with 15 additions and 2 deletions

View File

@ -21,7 +21,7 @@
</mat-icon>
</a>
<a *ngIf="!open(jitsiRoom, false)" mat-button disabled matTooltip="{{'jitsi.rooms.notStarted' | i18n}}">
<a *ngIf="!open(jitsiRoom, false)" mat-button matTooltip="{{'jitsi.rooms.notStarted' | i18n}}" (click)="copyRoomUrlToClipboard(jitsiRoom)">
{{ jitsiRoom.room }}
</a>

View File

@ -156,6 +156,19 @@ export class JitsiComponent implements OnInit {
});
}
copyRoomUrlToClipboard(jitsiRoom: any) {
const selBox = document.createElement('textarea');
selBox.value = jitsiRoom.url;
document.body.appendChild(selBox);
selBox.focus();
selBox.select();
document.execCommand('copy');
document.body.removeChild(selBox);
this.snackBar.open(this.i18n.get("jitsi.rooms.clipboard.copied", []), this.i18n.get("close", []), {
duration: 3000
});
}
clearModeration(jitsiRoom) {
if (!jitsiRoom.starts) {
jitsiRoom.moderationStarts = null;
@ -212,7 +225,7 @@ export class JitsiEditDialog {
jitsiRoom.moderationStarts = null;
}
}
save() {
this.jitsiService.update(this.jitsiRoom).subscribe((result: any) => {
this.dialogRef.close(result);