Skip to content

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

feat(frontend:files): add lock indicator to selection panel and align badge styles for consistency

johaven18bf5e653253
diff --git a/frontend/src/app/applications/files/components/sidebar/files-selection.component.html b/frontend/src/app/applications/files/components/sidebar/files-selection.component.html
index cc0af73f..90e5f420 100644
--- a/frontend/src/app/applications/files/components/sidebar/files-selection.component.html
+++ b/frontend/src/app/applications/files/components/sidebar/files-selection.component.html
@@ -117,29 +117,35 @@
</div>
</div>
}
- @if (f.spaces.length || f.shares.length || f.links.length || f.syncs.length) {
+ @if (f.lock || f.spaces.length || f.shares.length || f.links.length || f.syncs.length) {
<hr class="mt-1 mb-2" />
- <div class="d-flex flex-wrap align-items-center p-2 fs-sm">
+ <div class="d-flex flex-wrap align-items-center p-2 fs-xs">
+ @if (f.lock) {
+ <div class="badge rounded-pill white-space bg-warning cursor-pointer mb-2">
+ <fa-icon [icon]="f.lock.isExclusive ? icons.faLock : icons.faUnlock"></fa-icon>
+ <span>&nbsp;{{ f.lock.owner }}</span>
+ </div>
+ }
@for (space of f.spaces; track space.id) {
- <div (click)="goToSpace(space)" class="badge rounded-pill bg-primary cursor-pointer me-1 mb-1">
+ <div (click)="goToSpace(space)" class="badge rounded-pill bg-primary cursor-pointer me-1 mb-2">
<fa-icon [icon]="icons.SPACES"></fa-icon>
<span>&nbsp;{{ space.name }}</span>
</div>
}
@for (share of f.shares; track share.id) {
- <div (click)="goToShare(share)" class="badge rounded-pill bg-primary cursor-pointer me-1 mb-1">
+ <div (click)="goToShare(share)" class="badge rounded-pill bg-primary cursor-pointer me-1 mb-2">
<fa-icon [icon]="icons.SHARES"></fa-icon>
<span>&nbsp;{{ share.name }}</span>
</div>
}
@for (link of f.links; track link.id) {
- <div (click)="goToShare(link)" class="badge rounded-pill bg-primary cursor-pointer me-1 mb-1">
+ <div (click)="goToShare(link)" class="badge rounded-pill bg-primary cursor-pointer me-1 mb-2">
<fa-icon [icon]="icons.LINKS"></fa-icon>
<span>&nbsp;{{ link.name }}</span>
</div>
}
@for (sync of f.syncs; track sync.id) {
- <div (click)="goToSync(sync)" class="badge rounded-pill bg-primary cursor-pointer me-1 mb-1">
+ <div (click)="goToSync(sync)" class="badge rounded-pill bg-primary cursor-pointer me-1 mb-2">
<fa-icon [icon]="icons.SYNC"></fa-icon>
<span>&nbsp;{{ sync.clientName }}</span>
</div>
diff --git a/frontend/src/app/applications/files/components/sidebar/files-selection.component.ts b/frontend/src/app/applications/files/components/sidebar/files-selection.component.ts
index 9adbf041..1819f66e 100755
--- a/frontend/src/app/applications/files/components/sidebar/files-selection.component.ts
+++ b/frontend/src/app/applications/files/components/sidebar/files-selection.component.ts
@@ -7,7 +7,7 @@
import { ChangeDetectionStrategy, Component, computed, inject, input, InputSignal, Signal } from '@angular/core'
import { Router } from '@angular/router'
import { FaIconComponent } from '@fortawesome/angular-fontawesome'
-import { faArrowsAlt, faClipboardCheck } from '@fortawesome/free-solid-svg-icons'
+import { faArrowsAlt, faClipboardCheck, faLock, faUnlock } from '@fortawesome/free-solid-svg-icons'
import { L10N_LOCALE, L10nLocale, L10nTranslateDirective, L10nTranslatePipe } from 'angular-l10n'
import { AutoResizeDirective } from '../../../../common/directives/auto-resize.directive'
import { TimeDateFormatPipe } from '../../../../common/pipes/time-date-format.pipe'
@@ -50,6 +50,8 @@ export class FilesSelectionComponent {
SHARES: SPACES_ICON.SHARES,
LINKS: SPACES_ICON.LINKS,
SYNC: SYNC_ICON.SYNC,
+ faLock,
+ faUnlock,
faClipboardCheck,
faArrowsAlt
}