diff --git a/CHANGELOG.md b/CHANGELOG.md index a973acf3e..c712f1ffc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Improved the usability of the _Copy link to clipboard_ action by adding a confirmation on success in the access table to share the portfolio - Improved the endpoint to fetch the logo of an asset or a platform by sending the original MIME type - Eliminated `got` in favor of using `fetch` - Changed the `REDIS_HOST` from `localhost` to `redis` in `.env.example` diff --git a/apps/client/src/app/components/access-table/access-table.component.html b/apps/client/src/app/components/access-table/access-table.component.html index 2a20e4631..44aee1644 100644 --- a/apps/client/src/app/components/access-table/access-table.component.html +++ b/apps/client/src/app/components/access-table/access-table.component.html @@ -66,7 +66,7 @@ @if (element.type === 'PUBLIC') { -
diff --git a/apps/client/src/app/components/access-table/access-table.component.ts b/apps/client/src/app/components/access-table/access-table.component.ts index da8ceb094..32ae7bfef 100644 --- a/apps/client/src/app/components/access-table/access-table.component.ts +++ b/apps/client/src/app/components/access-table/access-table.component.ts @@ -12,6 +12,7 @@ import { OnChanges, Output } from '@angular/core'; +import { MatSnackBar } from '@angular/material/snack-bar'; import { MatTableDataSource } from '@angular/material/table'; @Component({ @@ -34,7 +35,8 @@ export class AccessTableComponent implements OnChanges { public constructor( private clipboard: Clipboard, - private notificationService: NotificationService + private notificationService: NotificationService, + private snackBar: MatSnackBar ) {} public ngOnChanges() { @@ -55,8 +57,16 @@ export class AccessTableComponent implements OnChanges { return `${this.baseUrl}/${languageCode}/p/${aId}`; } - public onCopyToClipboard(aId: string): void { + public onCopyUrlToClipboard(aId: string): void { this.clipboard.copy(this.getPublicUrl(aId)); + + this.snackBar.open( + '✅ ' + $localize`Link has been copied to the clipboard`, + undefined, + { + duration: 3000 + } + ); } public onDeleteAccess(aId: string) {