|
|
|
@ -3,6 +3,7 @@ import { NotificationService } from '@ghostfolio/client/core/notification/notifi
|
|
|
|
|
import { DEFAULT_LANGUAGE_CODE } from '@ghostfolio/common/config';
|
|
|
|
|
import { Access } from '@ghostfolio/common/interfaces';
|
|
|
|
|
|
|
|
|
|
import { Clipboard } from '@angular/cdk/clipboard';
|
|
|
|
|
import {
|
|
|
|
|
ChangeDetectionStrategy,
|
|
|
|
|
Component,
|
|
|
|
@ -31,7 +32,10 @@ export class AccessTableComponent implements OnChanges, OnInit {
|
|
|
|
|
public defaultLanguageCode = DEFAULT_LANGUAGE_CODE;
|
|
|
|
|
public displayedColumns = [];
|
|
|
|
|
|
|
|
|
|
public constructor(private notificationService: NotificationService) {}
|
|
|
|
|
public constructor(
|
|
|
|
|
private clipboard: Clipboard,
|
|
|
|
|
private notificationService: NotificationService
|
|
|
|
|
) {}
|
|
|
|
|
|
|
|
|
|
public ngOnInit() {}
|
|
|
|
|
|
|
|
|
@ -47,6 +51,14 @@ export class AccessTableComponent implements OnChanges, OnInit {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public getPublicUrl(aId: string): string {
|
|
|
|
|
return `${this.baseUrl}/${this.defaultLanguageCode}/p/${aId}`;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public onCopyToClipboard(aId: string): void {
|
|
|
|
|
this.clipboard.copy(this.getPublicUrl(aId));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public onDeleteAccess(aId: string) {
|
|
|
|
|
this.notificationService.confirm({
|
|
|
|
|
confirmFn: () => {
|
|
|
|
|