Skip to content

Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.

fix(frontend:links): prevent copy link button flicker

johaven0e61b4f2043e
diff --git a/frontend/src/app/applications/links/components/links.component.html b/frontend/src/app/applications/links/components/links.component.html
index 0ee01867..15b14786 100644
--- a/frontend/src/app/applications/links/components/links.component.html
+++ b/frontend/src/app/applications/links/components/links.component.html
@@ -4,8 +4,10 @@
role="toolbar">
<button (click)="copyToClipboard()"
[attr.aria-label]="'Copy link' | translate:locale.language"
+ [class.btn-default]="!linkWasCopied"
+ [class.btn-primary]="linkWasCopied"
[disabled]="!selected"
- class="btn {{linkWasCopied ? 'btn-primary' : 'btn-default'}} app-top-menu-tool-bar__action--quiet app-top-menu-tool-bar__action--breadcrumb-aligned"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet app-top-menu-tool-bar__action--breadcrumb-aligned"
type="button">
<svg [lucideIcon]="linkWasCopied? icons.LucideClipboardCheck : icons.LucideClipboard"></svg>
<span class="app-top-menu-tool-bar__label" l10nTranslate>Copy link</span>