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> </mat-icon>
</a> </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 }} {{ jitsiRoom.room }}
</a> </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) { clearModeration(jitsiRoom) {
if (!jitsiRoom.starts) { if (!jitsiRoom.starts) {
jitsiRoom.moderationStarts = null; jitsiRoom.moderationStarts = null;