feat(dashboard): add links to element IDs in dashboard table
This commit is contained in:
parent
50fa637a35
commit
8302387aa7
2 changed files with 8 additions and 2 deletions
|
@ -14,7 +14,9 @@
|
|||
<ng-container matColumnDef="id">
|
||||
<th mat-header-cell *matHeaderCellDef> ID </th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
{{element.id}}
|
||||
<a href="{{element.id}}">
|
||||
{{element.id}}
|
||||
</a>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
|
|
|
@ -21,7 +21,11 @@ export class DashboardComponent {
|
|||
constructor(private linkService: LinkService, private router: Router) { };
|
||||
|
||||
copyLink(id: string) {
|
||||
navigator.clipboard.writeText(window.location.hostname + '/' + id);
|
||||
navigator.clipboard.writeText(this.getShortLink(id));
|
||||
}
|
||||
|
||||
getShortLink(id: string): string {
|
||||
return window.location.hostname + '/' + id;
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
|
|
Loading…
Add table
Reference in a new issue