|
|
@ -3,6 +3,7 @@ import { NotificationService } from '@ghostfolio/client/core/notification/notifi
|
|
|
|
import { DEFAULT_LANGUAGE_CODE } from '@ghostfolio/common/config';
|
|
|
|
import { DEFAULT_LANGUAGE_CODE } from '@ghostfolio/common/config';
|
|
|
|
import { Access } from '@ghostfolio/common/interfaces';
|
|
|
|
import { Access } from '@ghostfolio/common/interfaces';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { Clipboard } from '@angular/cdk/clipboard';
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
ChangeDetectionStrategy,
|
|
|
|
ChangeDetectionStrategy,
|
|
|
|
Component,
|
|
|
|
Component,
|
|
|
@ -31,7 +32,10 @@ export class AccessTableComponent implements OnChanges, OnInit {
|
|
|
|
public defaultLanguageCode = DEFAULT_LANGUAGE_CODE;
|
|
|
|
public defaultLanguageCode = DEFAULT_LANGUAGE_CODE;
|
|
|
|
public displayedColumns = [];
|
|
|
|
public displayedColumns = [];
|
|
|
|
|
|
|
|
|
|
|
|
public constructor(private notificationService: NotificationService) {}
|
|
|
|
public constructor(
|
|
|
|
|
|
|
|
private clipboard: Clipboard,
|
|
|
|
|
|
|
|
private notificationService: NotificationService
|
|
|
|
|
|
|
|
) {}
|
|
|
|
|
|
|
|
|
|
|
|
public ngOnInit() {}
|
|
|
|
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) {
|
|
|
|
public onDeleteAccess(aId: string) {
|
|
|
|
this.notificationService.confirm({
|
|
|
|
this.notificationService.confirm({
|
|
|
|
confirmFn: () => {
|
|
|
|
confirmFn: () => {
|
|
|
|