Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.
TypeScript cloud-alternativecollaborationcollaborative-editingdropboxfile-serverfile-sharingfile-storagefile-syncfull-text-searchhomelabnextcloudon-premiseopen-sourceprivacy-firstprivate-cloudrealtimesecureself-hostedstorage-serverwebdav
refactor(frontend): improve dialogs and file management components styling and behavior adjustments
johaven4cd1a115f45d
diff --git a/frontend/src/app/applications/shares/components/dialogs/share-dialog.component.html b/frontend/src/app/applications/shares/components/dialogs/share-dialog.component.htmlindex a69b8cbb..b5a72c60 100644--- a/frontend/src/app/applications/shares/components/dialogs/share-dialog.component.html+++ b/frontend/src/app/applications/shares/components/dialogs/share-dialog.component.html@@ -15,7 +15,11 @@<span l10nTranslate>Edit share</span></h4>}- <button (click)="layout.closeDialog()" aria-label="Close" class="btn-close btn-close-white {{share.id ? 'ms-2' : 'ms-auto'}} ms-2" type="button"></button>+ <button (click)="layout.closeDialog()"+ aria-label="Close"+ class="btn-close btn-close-white {{share.id ? 'ms-2' : 'ms-auto'}} ms-2"+ type="button">+ </button></div><div class="modal-body"><tabset [justified]="true" type="pills">diff --git a/frontend/src/app/applications/spaces/components/dialogs/space-anchor-file-dialog.component.html b/frontend/src/app/applications/spaces/components/dialogs/space-anchor-file-dialog.component.htmlindex 919b1a7b..5bd4632c 100644--- a/frontend/src/app/applications/spaces/components/dialogs/space-anchor-file-dialog.component.html+++ b/frontend/src/app/applications/spaces/components/dialogs/space-anchor-file-dialog.component.html@@ -21,7 +21,12 @@</div><div class="mb-3"><label class="form-label" for="files" l10nTranslate>Files</label>- <app-space-manage-roots id="files" [space]="space" [user]="user" [showInfo]="false" [showUsers]="false"></app-space-manage-roots>+ <app-space-manage-roots id="files"+ [space]="space"+ [user]="user"+ [showInfo]="false"+ [showUsers]="false"+ [showRemove]="files.length > 1"></app-space-manage-roots></div></div><div class="modal-footer">diff --git a/frontend/src/app/applications/spaces/components/dialogs/space-anchor-file-dialog.component.ts b/frontend/src/app/applications/spaces/components/dialogs/space-anchor-file-dialog.component.tsindex 783bb273..6fcd9ab4 100644--- a/frontend/src/app/applications/spaces/components/dialogs/space-anchor-file-dialog.component.ts+++ b/frontend/src/app/applications/spaces/components/dialogs/space-anchor-file-dialog.component.ts@@ -7,6 +7,7 @@ import { L10N_LOCALE, L10nLocale, L10nTranslateDirective, L10nTranslatePipe } frimport { Observable } from 'rxjs'import { SelectComponent } from '../../../../common/components/select/select.component'import { LayoutService } from '../../../../layout/layout.service'+import { resolveFileLocation } from '../../../files/components/utils/file-location.utils'import { mimeDirectory } from '../../../files/files.constants'import { FileModel } from '../../../files/models/file.model'import { UserType } from '../../../users/interfaces/user.interface'@@ -40,6 +41,7 @@ export class SpaceAnchorFileDialogComponent implements OnInit {ngOnInit() {for (const f of this.files) {+ const file = { ...f, path: resolveFileLocation(f.path)?.relativePath ?? f.path }this.space.roots.push({id: f.id,name: f.name,@@ -50,7 +52,7 @@ export class SpaceAnchorFileDialogComponent implements OnInit {hPerms: setBooleanPermissions('', [SPACE_OPERATION.SHARE_INSIDE]),isDir: f.mime === mimeDirectory,owner: { id: this.user.id, login: this.user.login },- file: f+ file})}}diff --git a/frontend/src/app/applications/spaces/components/dialogs/space-dialog.component.html b/frontend/src/app/applications/spaces/components/dialogs/space-dialog.component.htmlindex 25337b02..56ce2d0a 100644--- a/frontend/src/app/applications/spaces/components/dialogs/space-dialog.component.html+++ b/frontend/src/app/applications/spaces/components/dialogs/space-dialog.component.html@@ -15,7 +15,11 @@<span l10nTranslate>Edit space</span></h4>}- <button (click)="layout.closeDialog()" aria-label="Close" class="btn-close btn-close-white {{space.id ? 'ms-2' : 'ms-auto'}} ms-2" type="button"></button>+ <button (click)="layout.closeDialog()"+ aria-label="Close"+ class="btn-close btn-close-white {{space.id ? 'ms-2' : 'ms-auto'}} ms-2"+ type="button">+ </button></div><div class="modal-body"><tabset [justified]="true" type="pills">@@ -73,7 +77,7 @@[class.dialog-check-card--active]="space.enabled"(click)="toggleSpaceStatusFromCard()"><div class="card-body p-2">- <label class="form-label" for="switchStatus" (click)="$event.stopPropagation()" l10nTranslate>Space status</label>+ <label class="form-label" for="switchStatus" (click)="$event.stopPropagation()" l10nTranslate>Space status</label><div class="d-flex align-items-center form-check form-switch cursor-pointer"><input class="form-check-input"[ngModel]="space.enabled"@@ -82,9 +86,9 @@id="switchStatus"type="checkbox"role="button">- <label class="form-label form-check-label mb-0 ms-2" for="switchStatus" (click)="$event.stopPropagation()" l10nTranslate>- {{ space.enabled ? 'enabled' : 'disabled' }}- </label>+ <label class="form-label form-check-label mb-0 ms-2" for="switchStatus" (click)="$event.stopPropagation()" l10nTranslate>+ {{ space.enabled ? 'enabled' : 'disabled' }}+ </label></div></div></div>@@ -93,12 +97,16 @@[class.dialog-check-card--active]="space.storageIndexing"(click)="toggleFullTextSearchFromCard()"><div class="card-body p-2">- <label class="form-label" for="switchFullText" (click)="$event.stopPropagation()" l10nTranslate>Full-text search</label>+ <label class="form-label" for="switchFullText" (click)="$event.stopPropagation()" l10nTranslate>Full-text search</label><div class="d-flex align-items-center form-check form-switch cursor-pointer">- <input class="form-check-input" [(ngModel)]="space.storageIndexing" (click)="$event.stopPropagation()" id="switchFullText" type="checkbox" role="button">- <label class="form-label form-check-label mb-0 ms-2" for="switchFullText" (click)="$event.stopPropagation()" l10nTranslate>- {{ space.storageIndexing ? 'enabled' : 'disabled' }}- </label>+ <input class="form-check-input"+ [(ngModel)]="space.storageIndexing"+ (click)="$event.stopPropagation()"+ id="switchFullText"+ type="checkbox" role="button">+ <label class="form-label form-check-label mb-0 ms-2" for="switchFullText" (click)="$event.stopPropagation()" l10nTranslate>+ {{ space.storageIndexing ? 'enabled' : 'disabled' }}+ </label></div></div></div>diff --git a/frontend/src/app/applications/spaces/components/spaces-browser.component.html b/frontend/src/app/applications/spaces/components/spaces-browser.component.htmlindex 7673f950..f76e6ff3 100644--- a/frontend/src/app/applications/spaces/components/spaces-browser.component.html+++ b/frontend/src/app/applications/spaces/components/spaces-browser.component.html@@ -35,6 +35,7 @@</a>}</li>+ <li class="dropdown-divider"></li><li role="menuitem"><a (click)="openNewDialog('download')" class="dropdown-item"><span l10nTranslate><svg [lucideIcon]="icons.LucideGlobe"></svg>Download from URL</span>diff --git a/frontend/src/app/applications/spaces/components/utils/space-manage-roots.component.html b/frontend/src/app/applications/spaces/components/utils/space-manage-roots.component.htmlindex 285bc195..d58bbc1f 100644--- a/frontend/src/app/applications/spaces/components/utils/space-manage-roots.component.html+++ b/frontend/src/app/applications/spaces/components/utils/space-manage-roots.component.html@@ -32,8 +32,7 @@</div></div>@if (showInfo) {- <div class="d-flex flex-column fs-2xs text-muted d-none d-lg-block ms-3">- <div class="d-flex justify-content-end">{{ r.alias }}</div>+ <div class="d-flex fs-2xs text-muted d-none d-lg-block ms-3"><div class="d-flex justify-content-end">{{ r.createdAt | amTimeAgo }}</div></div>}@@ -62,17 +61,20 @@<button(click)="setRenamed(r)"[tooltip]="'Rename' | translate:locale.language"- class="btn {{r.isRenamed ? 'btn-success' : 'btn-secondary'}} me-2"+ class="btn {{r.isRenamed ? 'btn-success' : 'btn-secondary'}}"+ [class.me-2]="showRemove"type="button"><svg [lucideIcon]="icons.LucidePencil"></svg></button>- <button- (click)="removeRoot(r)"- [tooltip]="'Remove' | translate:locale.language"- class="btn btn-danger"- type="button">- <svg [lucideIcon]="icons.LucideX"></svg>- </button>+ @if (showRemove) {+ <button+ (click)="removeRoot(r)"+ [tooltip]="'Remove' | translate:locale.language"+ class="btn btn-danger"+ type="button">+ <svg [lucideIcon]="icons.LucideX"></svg>+ </button>+ }</div></div></div>diff --git a/frontend/src/app/applications/spaces/components/utils/space-manage-roots.component.ts b/frontend/src/app/applications/spaces/components/utils/space-manage-roots.component.tsindex 81f37093..045f8b20 100644--- a/frontend/src/app/applications/spaces/components/utils/space-manage-roots.component.ts+++ b/frontend/src/app/applications/spaces/components/utils/space-manage-roots.component.ts@@ -49,6 +49,7 @@ export class SpaceManageRootsComponent implements OnInit, OnDestroy {@Input({ required: true }) user: UserType@Input() showInfo = true@Input() showUsers = true+ @Input() showRemove = true@Input() addRootFile: Subject<FileTreeEvent | ExternalFilePathEvent> = nullprotected locale = inject<L10nLocale>(L10N_LOCALE)protected readonly icons = { LucideX, LucidePencil }diff --git a/frontend/src/styles/components/_app.scss b/frontend/src/styles/components/_app.scssindex ada14807..7cede8f3 100755--- a/frontend/src/styles/components/_app.scss+++ b/frontend/src/styles/components/_app.scss@@ -75,6 +75,10 @@background: rgba(0, 0, 0, 0.3);color: rgba(255, 255, 255, 0.8);border: .5px solid lighten($dark-dialog-tabs-bar-bg, 5%);++ .lucide {+ font-size: 1rem;+ }}.form-control {diff --git a/frontend/src/styles/components/_recents.scss b/frontend/src/styles/components/_recents.scssindex 07c8f84c..8e5a6c0d 100644--- a/frontend/src/styles/components/_recents.scss+++ b/frontend/src/styles/components/_recents.scss@@ -127,7 +127,7 @@.recent-item-card__path {line-height: 1.15;- font-size: $font-size-sm;+ font-size: $font-size-xs;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;