Browse Source

address pr comments

pull/3768/head
Shaunak Das 11 months ago
parent
commit
0e3c627ec0
  1. 8
      apps/client/src/app/components/access-table/access-table.component.html
  2. 8
      apps/client/src/app/components/access-table/access-table.component.ts

8
apps/client/src/app/components/access-table/access-table.component.html

@ -35,9 +35,7 @@
@if (element.type === 'PUBLIC') {
<div class="align-items-center d-flex">
<ion-icon class="mr-1" name="link-outline" />
<a
href="{{ baseUrl }}/{{ defaultLanguageCode }}/p/{{ element.id }}"
target="_blank"
<a target="_blank" [href]="getPublicUrl(element.id)"
>{{ baseUrl }}/{{ defaultLanguageCode }}/p/{{ element.id }}</a
>
</div>
@ -59,8 +57,8 @@
</button>
<mat-menu #transactionMenu="matMenu" xPosition="before">
@if (element.type === 'PUBLIC') {
<button mat-menu-item (click)="copyToClipBoard(element.id)">
<ng-container i18n>Copy to clipboard</ng-container>
<button mat-menu-item (click)="onCopyToClipboard(element.id)">
<ng-container i18n>Copy link to clipboard</ng-container>
</button>
}
<button mat-menu-item (click)="onDeleteAccess(element.id)">

8
apps/client/src/app/components/access-table/access-table.component.ts

@ -51,8 +51,12 @@ export class AccessTableComponent implements OnChanges, OnInit {
}
}
public copyToClipBoard(aId: string): void {
this.clipboard.copy(`${this.baseUrl}/${this.defaultLanguageCode}/p/${aId}`);
public onCopyToClipboard(aId: string): void {
this.clipboard.copy(this.getPublicUrl(aId));
}
public getPublicUrl(aId: string): string {
return `${this.baseUrl}/${this.defaultLanguageCode}/p/${aId}`;
}
public onDeleteAccess(aId: string) {

Loading…
Cancel
Save