|
@ -12,6 +12,7 @@ import { |
|
|
OnChanges, |
|
|
OnChanges, |
|
|
Output |
|
|
Output |
|
|
} from '@angular/core'; |
|
|
} from '@angular/core'; |
|
|
|
|
|
import { MatSnackBar } from '@angular/material/snack-bar'; |
|
|
import { MatTableDataSource } from '@angular/material/table'; |
|
|
import { MatTableDataSource } from '@angular/material/table'; |
|
|
|
|
|
|
|
|
@Component({ |
|
|
@Component({ |
|
@ -34,7 +35,8 @@ export class AccessTableComponent implements OnChanges { |
|
|
|
|
|
|
|
|
public constructor( |
|
|
public constructor( |
|
|
private clipboard: Clipboard, |
|
|
private clipboard: Clipboard, |
|
|
private notificationService: NotificationService |
|
|
private notificationService: NotificationService, |
|
|
|
|
|
private snackBar: MatSnackBar |
|
|
) {} |
|
|
) {} |
|
|
|
|
|
|
|
|
public ngOnChanges() { |
|
|
public ngOnChanges() { |
|
@ -55,8 +57,16 @@ export class AccessTableComponent implements OnChanges { |
|
|
return `${this.baseUrl}/${languageCode}/p/${aId}`; |
|
|
return `${this.baseUrl}/${languageCode}/p/${aId}`; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public onCopyToClipboard(aId: string): void { |
|
|
public onCopyUrlToClipboard(aId: string): void { |
|
|
this.clipboard.copy(this.getPublicUrl(aId)); |
|
|
this.clipboard.copy(this.getPublicUrl(aId)); |
|
|
|
|
|
|
|
|
|
|
|
this.snackBar.open( |
|
|
|
|
|
'✅ ' + $localize`Link has been copied to the clipboard`, |
|
|
|
|
|
undefined, |
|
|
|
|
|
{ |
|
|
|
|
|
duration: 3000 |
|
|
|
|
|
} |
|
|
|
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public onDeleteAccess(aId: string) { |
|
|
public onDeleteAccess(aId: string) { |
|
|