Skip to content

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

style(frontend): harmonize app top menu action states and navigation colors (#278)

Johan Legrand718cfbe2b06d
diff --git a/frontend/src/app/applications/admin/components/admin-groups.component.html b/frontend/src/app/applications/admin/components/admin-groups.component.html
index ab2459e8..ba4eabcb 100644
--- a/frontend/src/app/applications/admin/components/admin-groups.component.html
+++ b/frontend/src/app/applications/admin/components/admin-groups.component.html
@@ -1,11 +1,14 @@
<!--Start Top Menu-->
-<div class="app-top-menu">
- <div class="btn-group me-1" dropdown>
- <button class="btn btn-default dropdown-toggle"
+<div class="app-top-menu app-top-menu-tool-bar"
+ [attr.aria-label]="'Actions' | translate:locale.language"
+ role="toolbar">
+ <div class="btn-group" dropdown>
+ <button class="btn btn-default dropdown-toggle app-top-menu-tool-bar__action--quiet app-top-menu-tool-bar__action--highlighted"
+ [attr.aria-label]="'New' | translate:locale.language"
dropdownToggle
- [tooltip]="'New' | translate:locale.language"
type="button">
<svg [lucideIcon]="icons.LucidePlus"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>New</span>
</button>
<ul *dropdownMenu class="dropdown-menu" role="menu">
<li role="menuitem">
@@ -21,22 +24,32 @@
</li>
</ul>
</div>
- <button (click)="openDialog(false, true)"
- class="d-none d-sm-block btn btn-default me-1"
- [disabled]="!selected"
- [tooltip]="(selected?.isUser ? 'Remove from group' : 'Delete group') | translate:locale.language"
- type="button">
- <svg [lucideIcon]="icons.LucideMinus"></svg>
- </button>
<button (click)="openDialog()"
+ [attr.aria-label]="(selected?.isGroup ? 'Edit group' : 'Edit user') | translate:locale.language"
[disabled]="!selected"
- class="btn btn-default me-1"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet"
[tooltip]="(selected?.isGroup ? 'Edit group' : 'Edit user') | translate:locale.language"
type="button">
<svg [lucideIcon]="icons.LucidePencil"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>Edit</span>
+ </button>
+ <button (click)="openDialog(false, true)"
+ [attr.aria-label]="(selected?.isUser ? 'Remove from group' : 'Delete group') | translate:locale.language"
+ class="d-none d-sm-block btn btn-default app-top-menu-tool-bar__action--quiet"
+ [disabled]="!selected"
+ type="button">
+ <svg [lucideIcon]="selected?.isUser ? icons.LucideUserMinus : icons.LucideTrash2"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>Delete</span>
+ </button>
+ <button (click)="refresh()"
+ [attr.aria-label]="'Refresh' | translate:locale.language"
+ class="d-none d-sm-block btn btn-default"
+ [tooltip]="'Refresh' | translate:locale.language"
+ type="button">
+ <svg [lucideIcon]="icons.LucideRotateCw" [class]="loading ? 'icon-spin' : ''"></svg>
</button>
<div class="d-flex align-items-center ms-auto">
- <div class="view-switch me-1" role="group" aria-label="Select group type">
+ <div class="view-switch" role="group" aria-label="Select group type">
<button
type="button"
class="view-switch__option"
@@ -58,12 +71,6 @@
Personal groups
</button>
</div>
- <button (click)="refresh()"
- class="d-none d-sm-block btn btn-default"
- [tooltip]="'Refresh' | translate:locale.language"
- type="button">
- <svg [lucideIcon]="icons.LucideRotateCw" [class]="loading ? 'icon-spin' : ''"></svg>
- </button>
</div>
</div>
<!--End Top Menu-->
@@ -188,7 +195,7 @@
</ng-template>
@if (selected.isGroup) {
<ng-template (execute)="openDialog(false, true)" contextMenuItem>
- <span l10nTranslate><svg [lucideIcon]="icons.LucideMinus"></svg>Delete group</span>
+ <span l10nTranslate><svg [lucideIcon]="icons.LucideTrash2"></svg>Delete group</span>
</ng-template>
} @else {
<ng-template (execute)="openDialog(false, true)" contextMenuItem>
diff --git a/frontend/src/app/applications/admin/components/admin-groups.component.ts b/frontend/src/app/applications/admin/components/admin-groups.component.ts
index f9da3432..fadfa724 100644
--- a/frontend/src/app/applications/admin/components/admin-groups.component.ts
+++ b/frontend/src/app/applications/admin/components/admin-groups.component.ts
@@ -7,10 +7,10 @@ import {
LucideArrowUp,
LucideDynamicIcon,
LucideKeyRound,
- LucideMinus,
LucidePencil,
LucidePlus,
LucideRotateCw,
+ LucideTrash2,
LucideUserMinus,
LucideUserRoundPlus
} from '@lucide/angular'
@@ -80,7 +80,7 @@ export class AdminGroupsComponent {
GROUPS: USER_ICON.GROUPS,
LucideRotateCw,
LucidePlus,
- LucideMinus,
+ LucideTrash2,
LucidePencil,
LucideArrowDown,
LucideArrowUp,
diff --git a/frontend/src/app/applications/admin/components/admin-spaces.component.html b/frontend/src/app/applications/admin/components/admin-spaces.component.html
index 4d99b858..96c27914 100644
--- a/frontend/src/app/applications/admin/components/admin-spaces.component.html
+++ b/frontend/src/app/applications/admin/components/admin-spaces.component.html
@@ -1,27 +1,35 @@
<!--Start Top Menu-->
-<div class="app-top-menu">
+<div class="app-top-menu app-top-menu-tool-bar"
+ [attr.aria-label]="'Actions' | translate:locale.language"
+ role="toolbar">
<button (click)="openSpaceDialog(true)"
- class="btn btn-default me-1"
+ [attr.aria-label]="'New space' | translate:locale.language"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet app-top-menu-tool-bar__action--highlighted"
[tooltip]="'New space' | translate:locale.language"
type="button">
<svg [lucideIcon]="icons.LucidePlus"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>New</span>
</button>
<button (click)="openSpaceDialog()"
+ [attr.aria-label]="'Edit space' | translate:locale.language"
[disabled]="!selected"
- class="btn btn-default me-1"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet"
[tooltip]="'Edit space' | translate:locale.language"
type="button">
<svg [lucideIcon]="icons.LucidePencil"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>Edit</span>
</button>
<button (click)="openChildShareDialog()"
+ [attr.aria-label]="'Edit children shares' | translate:locale.language"
[disabled]="!selected?.counts.shares"
- class="btn btn-default me-1"
+ class="btn btn-default"
[tooltip]="'Edit children shares' | translate:locale.language"
type="button">
<svg [lucideIcon]="icons.SHARES"></svg>
</button>
- <div class="d-flex align-items-center ms-auto">
+ <div class="d-flex align-items-center">
<button (click)="loadSpaces()"
+ [attr.aria-label]="'Refresh' | translate:locale.language"
class="d-none d-sm-block btn btn-default"
[tooltip]="'Refresh' | translate:locale.language"
type="button">
diff --git a/frontend/src/app/applications/admin/components/admin-tools.component.html b/frontend/src/app/applications/admin/components/admin-tools.component.html
index 9da53ac5..e3ebc659 100644
--- a/frontend/src/app/applications/admin/components/admin-tools.component.html
+++ b/frontend/src/app/applications/admin/components/admin-tools.component.html
@@ -10,7 +10,7 @@
<div class="card dialog-check-card">
<div class="card-body p-2">
<div class="row g-2 align-items-center py-2 border-bottom border-secondary-subtle">
- <label for="" class="form-label col-7 col-sm-6 mb-0" l10nTranslate>State</label>
+ <div class="form-label col-7 col-sm-6 mb-0" l10nTranslate>State</div>
<div class="col-5 col-sm-6 text-end">
@switch (indexingStatus.state) {
@case (IndexingState.RUNNING) {
@@ -29,13 +29,13 @@
</div>
</div>
<div class="row g-2 align-items-center py-2 border-bottom border-secondary-subtle">
- <label for="" class="form-label col-7 col-sm-6 mb-0" l10nTranslate>Indexes</label>
+ <div class="form-label col-7 col-sm-6 mb-0" l10nTranslate>Indexes</div>
<div class="col-5 col-sm-6 text-end">
<span class="badge bg-primary">{{ indexingStatus.indexesCount }}</span>
</div>
</div>
<div class="row g-2 align-items-center py-2 border-bottom border-secondary-subtle mb-2">
- <label for="" class="form-label col-7 col-sm-6 mb-0" l10nTranslate>Last partial run</label>
+ <div class="form-label col-7 col-sm-6 mb-0" l10nTranslate>Last partial run</div>
<div class="col-5 col-sm-6 text-end">
@if (indexingStatus.lastPartialRunAt) {
<span class="badge bg-purple text-muted">{{ indexingStatus.lastPartialRunAt | amDateFormat }}</span>
@@ -45,7 +45,7 @@
</div>
</div>
<div class="row g-2 align-items-center py-2 border-bottom border-secondary-subtle mb-2">
- <label for="" class="form-label col-7 col-sm-6 mb-0" l10nTranslate>Last full run</label>
+ <div class="form-label col-7 col-sm-6 mb-0" l10nTranslate>Last full run</div>
<div class="col-5 col-sm-6 text-end">
@if (indexingStatus.lastFullRunAt) {
<span class="badge bg-purple text-muted">{{ indexingStatus.lastFullRunAt | amDateFormat }}</span>
@@ -54,7 +54,7 @@
}
</div>
</div>
- <label for="" class="form-label me-auto mb-0 text-nowrap" l10nTranslate>Actions</label>
+ <div class="form-label me-auto mb-0 text-nowrap" l10nTranslate>Actions</div>
<div class="d-flex align-items-center">
<div class="text-muted no-select fs-sm my-3 px-1 me-auto" l10nTranslate>
Start or stop indexing.
diff --git a/frontend/src/app/applications/admin/components/admin-users.component.html b/frontend/src/app/applications/admin/components/admin-users.component.html
index 62acac84..4be7f175 100644
--- a/frontend/src/app/applications/admin/components/admin-users.component.html
+++ b/frontend/src/app/applications/admin/components/admin-users.component.html
@@ -1,28 +1,42 @@
<!--Start Top Menu-->
-<div class="app-top-menu">
+<div class="app-top-menu app-top-menu-tool-bar"
+ [attr.aria-label]="'Actions' | translate:locale.language"
+ role="toolbar">
<button (click)="openDialog(true)"
- class="btn btn-default me-1"
+ [attr.aria-label]="(guestsView ? 'New guest' : 'New user') | translate:locale.language"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet app-top-menu-tool-bar__action--highlighted"
[tooltip]="(guestsView ? 'New guest' : 'New user') | translate:locale.language"
type="button">
<svg [lucideIcon]="icons.LucideUserRoundPlus"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>New</span>
</button>
<button (click)="openDialog()"
+ [attr.aria-label]="(guestsView ? 'Edit guest' : 'Edit user') | translate:locale.language"
[disabled]="!selected"
- class="btn btn-default me-1"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet"
[tooltip]="(guestsView ? 'Edit guest' : 'Edit user') | translate:locale.language"
type="button">
<svg [lucideIcon]="icons.LucideUserRoundPen"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>Edit</span>
</button>
<button (click)="impersonateIdentity()"
+ [attr.aria-label]="'Impersonate identity' | translate:locale.language"
[disabled]="!selected"
- class="d-none d-sm-block btn btn-default me-1"
+ class="d-none d-sm-block btn btn-default"
[tooltip]="'Impersonate identity' | translate:locale.language"
type="button">
<svg [lucideIcon]="icons.LucideVenetianMask"></svg>
</button>
+ <button (click)="loadUsersOrGuests()"
+ [attr.aria-label]="'Refresh' | translate:locale.language"
+ class="d-none d-sm-block btn btn-default"
+ [tooltip]="'Refresh' | translate:locale.language"
+ type="button">
+ <svg [lucideIcon]="icons.LucideRotateCw" [class]="loading ? 'icon-spin' : ''"></svg>
+ </button>
<div class="d-flex align-items-center ms-auto">
<!--Start View Switch-->
- <div class="view-switch me-1" role="group" aria-label="Select user type">
+ <div class="view-switch" role="group" aria-label="Select user type">
<button
type="button"
class="view-switch__option"
@@ -45,12 +59,6 @@
</button>
</div>
<!--End View Switch-->
- <button (click)="loadUsersOrGuests()"
- class="d-none d-sm-block btn btn-default"
- [tooltip]="'Refresh' | translate:locale.language"
- type="button">
- <svg [lucideIcon]="icons.LucideRotateCw" [class]="loading ? 'icon-spin' : ''"></svg>
- </button>
</div>
</div>
<!--End Top Menu-->
diff --git a/frontend/src/app/applications/admin/components/dialogs/admin-group-delete-dialog.component.html b/frontend/src/app/applications/admin/components/dialogs/admin-group-delete-dialog.component.html
index b8755b0a..8fcbf454 100644
--- a/frontend/src/app/applications/admin/components/dialogs/admin-group-delete-dialog.component.html
+++ b/frontend/src/app/applications/admin/components/dialogs/admin-group-delete-dialog.component.html
@@ -1,6 +1,6 @@
<div class="modal-header">
<h4 class="modal-title">
- <svg [lucideIcon]="member.isUser ? icons.LucideUserMinus : icons.LucideMinus"></svg>
+ <svg [lucideIcon]="member.isUser ? icons.LucideUserMinus : icons.LucideTrash2"></svg>
<span>{{ member.name }}</span>
</h4>
<h4 class="modal-title ms-auto">
@@ -41,4 +41,3 @@
Remove
</button>
</div>
-
diff --git a/frontend/src/app/applications/admin/components/dialogs/admin-group-delete-dialog.component.ts b/frontend/src/app/applications/admin/components/dialogs/admin-group-delete-dialog.component.ts
index d24acd3d..26405b50 100644
--- a/frontend/src/app/applications/admin/components/dialogs/admin-group-delete-dialog.component.ts
+++ b/frontend/src/app/applications/admin/components/dialogs/admin-group-delete-dialog.component.ts
@@ -1,6 +1,6 @@
import { HttpErrorResponse } from '@angular/common/http'
import { Component, EventEmitter, inject, Input, Output } from '@angular/core'
-import { LucideDynamicIcon, LucideMinus, LucideUserMinus } from '@lucide/angular'
+import { LucideDynamicIcon, LucideTrash2, LucideUserMinus } from '@lucide/angular'
import { L10nTranslateDirective } from 'angular-l10n'
import { CapitalizePipe } from '../../../../common/pipes/capitalize.pipe'
import { LayoutService } from '../../../../layout/layout.service'
@@ -19,7 +19,7 @@ export class AdminGroupDeleteDialogComponent {
@Input({ required: true }) member: MemberModel
@Output() wasDeleted = new EventEmitter<boolean>()
protected submitted = false
- protected readonly icons = { GROUPS: USER_ICON.GROUPS, LucideMinus, LucideUserMinus }
+ protected readonly icons = { GROUPS: USER_ICON.GROUPS, LucideTrash2, LucideUserMinus }
private readonly layout = inject(LayoutService)
private readonly adminService = inject(AdminService)
diff --git a/frontend/src/app/applications/admin/components/dialogs/admin-user-dialog.component.html b/frontend/src/app/applications/admin/components/dialogs/admin-user-dialog.component.html
index e9908482..741ab4a2 100644
--- a/frontend/src/app/applications/admin/components/dialogs/admin-user-dialog.component.html
+++ b/frontend/src/app/applications/admin/components/dialogs/admin-user-dialog.component.html
@@ -77,14 +77,14 @@
<div class="card-body d-flex flex-column gap-3">
<div>
<div class="d-flex align-items-center gap-2 mb-1">
- <label class="form-label mb-0" for="password" l10nTranslate>Password</label>
+ <label class="form-label mb-0" for="adminUserPassword" l10nTranslate>Password</label>
@if (userForm.value.password !== defaultPassword) {
<div class="d-flex align-items-center ms-auto">
<app-password-strength-bar [passwordToCheck]="userForm.value.password"></app-password-strength-bar>
</div>
}
</div>
- <app-input-password id="password"
+ <app-input-password inputId="adminUserPassword"
class="w-100"
[password]="userForm.value.password"
(passwordChange)="updatePassword($event)"
@@ -205,7 +205,7 @@
<div class="col-12 col-lg-5 d-flex flex-column">
<div class="card dialog-tab-card w-100 h-100">
<div class="card-body d-flex flex-column gap-2">
- <label for="" class="form-label mb-1" l10nTranslate>Account status</label>
+ <div class="form-label mb-1" l10nTranslate>Account status</div>
<div class="card dialog-check-card dialog-check-card--interactive"
[class.dialog-check-card--active]="userForm.value.isActive"
(click)="toggleAccountSetting('isActive')">
diff --git a/frontend/src/app/applications/favorites/components/favorites.component.html b/frontend/src/app/applications/favorites/components/favorites.component.html
index 453051a1..f48a183b 100644
--- a/frontend/src/app/applications/favorites/components/favorites.component.html
+++ b/frontend/src/app/applications/favorites/components/favorites.component.html
@@ -1,26 +1,31 @@
<!--Start Top Menu-->
-<div class="app-top-menu">
+<div class="app-top-menu app-top-menu-tool-bar"
+ [attr.aria-label]="'Actions' | translate:locale.language"
+ role="toolbar">
<button (click)="goTo()"
+ [attr.aria-label]="'Go to' | translate:locale.language"
[disabled]="!selected || selected.isDisabled"
- class="btn btn-default me-1"
- [tooltip]="'Go to' | translate:locale.language"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet app-top-menu-tool-bar__action--highlighted"
type="button">
<svg [lucideIcon]="icons.LucideMapPin"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>Go to</span>
</button>
<button (click)="removeFavorite()"
+ [attr.aria-label]="'Remove from favorites' | translate:locale.language"
[disabled]="!selected"
- class="btn btn-default me-1"
- [tooltip]="'Remove from favorites' | translate:locale.language"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet"
type="button">
<svg [lucideIcon]="icons.REMOVE_FAVORITE"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>Unfavorite</span>
+ </button>
+ <button (click)="loadFavorites()"
+ [attr.aria-label]="'Refresh' | translate:locale.language"
+ class="d-none d-sm-block btn btn-default"
+ [tooltip]="'Refresh' | translate:locale.language"
+ type="button">
+ <svg [lucideIcon]="icons.LucideRotateCw" [class]="loading ? 'icon-spin' : ''"></svg>
</button>
<div class="d-flex align-items-center ms-auto">
- <button (click)="loadFavorites()"
- class="d-none d-sm-block btn btn-default me-1"
- [tooltip]="'Refresh' | translate:locale.language"
- type="button">
- <svg [lucideIcon]="icons.LucideRotateCw" [class]="loading ? 'icon-spin' : ''"></svg>
- </button>
<app-navigation-view (switchView)="galleryMode = $event"></app-navigation-view>
</div>
</div>
diff --git a/frontend/src/app/applications/files/components/dialogs/files-new-dialog.component.html b/frontend/src/app/applications/files/components/dialogs/files-new-dialog.component.html
index 508626f6..da24372f 100755
--- a/frontend/src/app/applications/files/components/dialogs/files-new-dialog.component.html
+++ b/frontend/src/app/applications/files/components/dialogs/files-new-dialog.component.html
@@ -5,10 +5,10 @@
<svg [lucideIcon]="icons.LucideGlobe"></svg>
}
@case ('directory') {
- <svg [lucideIcon]="icons.LucideFolderClosed"></svg>
+ <img [src]="directoryMimeUrl" class="me-2" alt="" draggable="false" height="26" width="26" />
}
@case ('file') {
- <svg [lucideIcon]="icons.LucideFileText"></svg>
+ <img [src]="selectedDocumentMimeUrl()" class="me-2" alt="" draggable="false" height="26" width="26" />
}
}
<span l10nTranslate>{{ fileProp.title }}</span>
@@ -16,24 +16,39 @@
<button (click)="layout.closeDialog()" aria-label="Close" class="btn-close btn-close-white" type="button"></button>
</div>
<div class="modal-body">
- @if (inputType === 'file') {
- <div class="btn-group mb-3" dropdown>
- <button aria-controls="dropdown-animated" class="btn btn-primary dropdown-toggle" dropdownToggle id="button-animated" type="button">
- <span l10nTranslate>{{ selectedDocType }}</span>
- <svg [lucideIcon]="icons.LucideChevronDown" class="ms-3"></svg>
- </button>
- <ul *dropdownMenu aria-labelledby="button-animated" class="dropdown-menu" id="dropdown-animated" role="menu">
+ @if (inputType !== 'download') {
+ <div class="mb-3" role="group" [attr.aria-label]="'New' | translate: locale.language">
+ <div class="row g-2">
+ <div class="col-12 col-sm-6">
+ <button
+ (click)="onSelectDirectory()"
+ [attr.aria-pressed]="inputType === 'directory'"
+ [class.active]="inputType === 'directory'"
+ class="btn btn-default w-100 me-0 justify-content-start"
+ type="button">
+ <img [src]="directoryMimeUrl" alt="" draggable="false" height="24" width="24" />
+ <span l10nTranslate>New folder</span>
+ </button>
+ </div>
+ </div>
+
+ <div class="text-muted text-uppercase text-bold fs-xs mt-3 mb-2" l10nTranslate>Document</div>
+ <div class="row g-2">
@for (item of docTypes | keyvalue: originalOrderKeyValue; track item.key) {
- <li role="menuitem">
- <a (click)="onSelectDocType(item.key)" class="dropdown-item">
- <div class="d-flex align-items-center">
- <div class="me-5" l10nTranslate>{{ item.key }}</div>
- <div class="ms-auto fs-xs">{{ item.value }}</div>
- </div>
- </a>
- </li>
+ <div class="col-12 col-sm-6">
+ <button
+ (click)="onSelectDocType(item.key)"
+ [attr.aria-pressed]="isSelectedDocType(item.key)"
+ [class.active]="isSelectedDocType(item.key)"
+ class="btn btn-default w-100 me-0 justify-content-start"
+ type="button">
+ <img [src]="documentMimeUrl(item.value)" alt="" draggable="false" height="24" width="24" />
+ <span l10nTranslate>{{ item.key }}</span>
+ <span class="ms-auto fs-xs opacity-75">.{{ item.value }}</span>
+ </button>
+ </div>
}
- </ul>
+ </div>
</div>
}
@if (inputType === 'download') {
@@ -45,6 +60,7 @@
[(ngModel)]="downloadProp.url"
(keydown.control.v)="pasteUrl()"
(keydown.meta.v)="pasteUrl()"
+ (keyup.enter)="onEnter()"
[placeholder]="downloadProp.placeholder | translate: locale.language"
class="form-control"
type="text"
@@ -55,7 +71,9 @@
<div class="input-group my-2">
<span class="input-group-text">
@if (inputType === 'directory') {
- <svg [lucideIcon]="icons.LucideFolderClosed"></svg>
+ <img [src]="directoryMimeUrl" alt="" draggable="false" height="24" width="24" />
+ } @else if (inputType === 'file') {
+ <img [src]="selectedDocumentMimeUrl()" alt="" draggable="false" height="24" width="24" />
} @else {
<svg [lucideIcon]="icons.LucideFileText"></svg>
}
@@ -63,11 +81,10 @@
<input
#InputText
[(ngModel)]="fileProp.name"
+ (keyup.enter)="onEnter()"
[placeholder]="fileProp.placeholder | translate: locale.language"
class="form-control"
- type="text"
- appAutofocus
- />
+ type="text" />
</div>
</div>
<div class="modal-footer">
diff --git a/frontend/src/app/applications/files/components/dialogs/files-new-dialog.component.ts b/frontend/src/app/applications/files/components/dialogs/files-new-dialog.component.ts
index 8f56ed30..9ac77dba 100644
--- a/frontend/src/app/applications/files/components/dialogs/files-new-dialog.component.ts
+++ b/frontend/src/app/applications/files/components/dialogs/files-new-dialog.component.ts
@@ -1,31 +1,43 @@
import { KeyValuePipe } from '@angular/common'
-import { AfterViewInit, Component, ElementRef, EventEmitter, HostListener, inject, Input, OnInit, Output, ViewChild } from '@angular/core'
+import { AfterViewInit, Component, ElementRef, EventEmitter, inject, Input, OnInit, Output, ViewChild } from '@angular/core'
import { FormsModule } from '@angular/forms'
-import { LucideChevronDown, LucideDynamicIcon, LucideFileText, LucideFolderClosed, LucideGlobe } from '@lucide/angular'
+import { LucideDynamicIcon, LucideFileText, LucideGlobe } from '@lucide/angular'
import { L10N_LOCALE, L10nLocale, L10nTranslateDirective, L10nTranslatePipe } from 'angular-l10n'
-import { BsDropdownModule } from 'ngx-bootstrap/dropdown'
import { AutofocusDirective } from '../../../../common/directives/auto-focus.directive'
import { originalOrderKeyValue } from '../../../../common/utils/functions'
import { validHttpSchemaRegexp } from '../../../../common/utils/regexp'
import { LayoutService } from '../../../../layout/layout.service'
import { StoreService } from '../../../../store/store.service'
+import { getAssetsMimeUrl, mimeDirectory, mimeFile } from '../../files.constants'
import { FileModel } from '../../models/file.model'
import { FilesService } from '../../services/files.service'
+const DOCUMENT_MIME_TYPES: Record<string, string> = {
+ odt: 'application-vnd.oasis.opendocument.text',
+ ods: 'application-vnd.oasis.opendocument.spreadsheet',
+ odp: 'application-vnd.oasis.opendocument.presentation',
+ docx: 'application-vnd.openxmlformats-officedocument.wordprocessingml.document',
+ xlsx: 'application-vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+ pptx: 'application-vnd.openxmlformats-officedocument.presentationml.presentation',
+ txt: 'text-plain',
+ md: 'text-markdown'
+}
+
@Component({
selector: 'app-files-files-new-dialog',
templateUrl: 'files-new-dialog.component.html',
- imports: [LucideDynamicIcon, L10nTranslateDirective, BsDropdownModule, FormsModule, L10nTranslatePipe, AutofocusDirective, KeyValuePipe]
+ imports: [LucideDynamicIcon, L10nTranslateDirective, FormsModule, L10nTranslatePipe, AutofocusDirective, KeyValuePipe]
})
export class FilesNewDialogComponent implements OnInit, AfterViewInit {
@Input() files: FileModel[]
- @Input() inputType: 'file' | 'directory' | 'download'
+ @Input() inputType: 'file' | 'directory' | 'download' = 'directory'
@Output() refreshFiles = new EventEmitter()
- @ViewChild('InputText', { static: true }) inputText: ElementRef
+ @ViewChild('InputText', { static: true }) inputText: ElementRef<HTMLInputElement>
protected readonly locale = inject<L10nLocale>(L10N_LOCALE)
protected layout = inject(LayoutService)
protected readonly originalOrderKeyValue = originalOrderKeyValue
- protected readonly icons = { LucideChevronDown, LucideGlobe, LucideFolderClosed, LucideFileText }
+ protected readonly icons = { LucideFileText, LucideGlobe }
+ protected readonly directoryMimeUrl = getAssetsMimeUrl(mimeDirectory)
protected fileProp = { title: '', name: '', placeholder: '' }
protected downloadProp = { title: '', url: '', placeholder: 'URL (https://...)' }
protected selectedDocType = 'Text'
@@ -37,33 +49,59 @@ export class FilesNewDialogComponent implements OnInit, AfterViewInit {
ngOnInit() {
if (this.inputType === 'download') {
- this.fileProp.title = 'Download from URL'
+ this.fileProp.title = 'Import from URL'
this.fileProp.placeholder = 'File name'
- } else if (this.inputType === 'file') {
- this.selectedDocType = this.docTypes[this.selectedDocType] ? this.selectedDocType : Object.keys(this.docTypes)[0]
- this.fileProp.name = `${this.layout.translateString('New document')}${this.docTypeExtension(this.selectedDocType)}`
+ return
+ }
+
+ this.selectedDocType = this.docTypes[this.selectedDocType] ? this.selectedDocType : Object.keys(this.docTypes)[0]
+ if (this.inputType === 'file') {
this.fileProp.title = 'New document'
+ this.fileProp.name = `${this.layout.translateString('New document')}${this.docTypeExtension(this.selectedDocType)}`
this.fileProp.placeholder = 'Document name'
} else {
this.fileProp.title = 'New folder'
+ this.fileProp.name = this.layout.translateString('New folder')
this.fileProp.placeholder = 'Folder name'
}
}
ngAfterViewInit() {
- if (this.inputType === 'file') {
- this.updateFileSelection()
+ if (this.inputType !== 'download') {
+ this.updateFileSelection(this.inputType === 'directory')
}
}
onSelectDocType(docType: string) {
+ const extensionPosition = this.fileNamePosition()
+ let baseName = this.inputType === 'file' && extensionPosition >= 0 ? this.fileProp.name.substring(0, extensionPosition) : this.fileProp.name
+ if (baseName === this.layout.translateString('New folder')) {
+ baseName = this.layout.translateString('New document')
+ }
+ this.inputType = 'file'
+ this.fileProp.title = 'New document'
this.selectedDocType = docType
- const pos = this.fileNamePosition()
- this.fileProp.name = `${this.fileProp.name.substring(0, pos < 0 ? this.fileProp.name.length : pos)}${this.docTypeExtension(docType)}`
+ this.fileProp.placeholder = 'Document name'
+ this.fileProp.name = `${baseName || this.layout.translateString('New document')}${this.docTypeExtension(docType)}`
this.updateFileSelection()
}
- @HostListener('document:keyup.enter')
+ onSelectDirectory() {
+ if (this.inputType === 'file') {
+ const extensionPosition = this.fileNamePosition()
+ if (extensionPosition >= 0) {
+ this.fileProp.name = this.fileProp.name.substring(0, extensionPosition)
+ }
+ if (this.fileProp.name === this.layout.translateString('New document')) {
+ this.fileProp.name = this.layout.translateString('New folder')
+ }
+ }
+ this.inputType = 'directory'
+ this.fileProp.title = 'New folder'
+ this.fileProp.placeholder = 'Folder name'
+ this.updateFileSelection(true)
+ }
+
onEnter() {
if (this.fileProp.name) {
this.onSubmit()
@@ -96,6 +134,23 @@ export class FilesNewDialogComponent implements OnInit, AfterViewInit {
}, 200)
}
+ protected documentMimeUrl(extension: string) {
+ return getAssetsMimeUrl(DOCUMENT_MIME_TYPES[extension] || mimeFile)
+ }
+
+ protected selectedDocumentMimeUrl() {
+ const extensionPosition = this.fileNamePosition()
+ const extension = extensionPosition >= 0 ? this.fileProp.name.slice(extensionPosition + 1).toLowerCase() : ''
+ const documentType = Object.values(this.docTypes).find((type) => type.toLowerCase() === extension)
+ return this.documentMimeUrl(documentType || '')
+ }
+
+ protected isSelectedDocType(docType: string) {
+ const extensionPosition = this.fileNamePosition()
+ const extension = extensionPosition >= 0 ? this.fileProp.name.slice(extensionPosition + 1).toLowerCase() : ''
+ return this.inputType === 'file' && extension === this.docTypes[docType]?.toLowerCase()
+ }
+
private fileNamePosition() {
return this.fileProp.name.lastIndexOf('.')
}
@@ -104,10 +159,13 @@ export class FilesNewDialogComponent implements OnInit, AfterViewInit {
return `.${this.docTypes[docType]}`
}
- private updateFileSelection() {
+ private updateFileSelection(selectAll = false) {
setTimeout(() => {
- this.inputText.nativeElement.focus()
- this.inputText.nativeElement.setSelectionRange(0, this.fileNamePosition())
+ const input = this.inputText.nativeElement
+ const extensionPosition = input.value.lastIndexOf('.')
+ const selectionEnd = selectAll || extensionPosition < 0 ? input.value.length : extensionPosition
+ input.focus()
+ input.setSelectionRange(0, selectionEnd)
}, 0)
}
}
diff --git a/frontend/src/app/applications/files/components/sidebar/files-clipboard.component.html b/frontend/src/app/applications/files/components/sidebar/files-clipboard.component.html
index fc5b54ad..a0601da2 100644
--- a/frontend/src/app/applications/files/components/sidebar/files-clipboard.component.html
+++ b/frontend/src/app/applications/files/components/sidebar/files-clipboard.component.html
@@ -1,4 +1,4 @@
-<div class="sidebar-component-title justify-content-between position-relative">
+<div class="sidebar-component-title app-top-menu-tool-bar justify-content-between position-relative">
<div class="sidebar-component-title-side">
<svg class="cursor-pointer"
[lucideIcon]="icons.LucideCircleQuestionMark"
@@ -9,7 +9,9 @@
</div>
<div class="sidebar-component-title-label" l10nTranslate>Clipboard</div>
<div class="sidebar-component-title-side">
- <button (click)="clearAll()" class="btn btn-default" type="button">
+ <button (click)="clearAll()"
+ class="btn btn-default app-top-menu-tool-bar__action--highlighted"
+ type="button">
<svg [lucideIcon]="icons.LucideX"></svg>
</button>
</div>
diff --git a/frontend/src/app/applications/files/components/sidebar/files-tasks.component.html b/frontend/src/app/applications/files/components/sidebar/files-tasks.component.html
index 5bec1828..d479f5e4 100644
--- a/frontend/src/app/applications/files/components/sidebar/files-tasks.component.html
+++ b/frontend/src/app/applications/files/components/sidebar/files-tasks.component.html
@@ -1,4 +1,4 @@
-<div class="sidebar-component-title justify-content-between">
+<div class="sidebar-component-title app-top-menu-tool-bar justify-content-between">
<div style="width: 25px"></div>
<div>
@switch (nbActiveTasks) {
@@ -19,11 +19,17 @@
@if (nbTotalTasks) {
<div class="d-flex gap-1">
@if (hasCancellableTasks) {
- <button type="button" (click)="cancelTasks()" [tooltip]="'Stop' | translate:locale.language" class="btn btn-default" placement="top">
- <svg [lucideIcon]="icons.LucideSquare"></svg>
+ <button type="button"
+ (click)="cancelTasks()"
+ [tooltip]="'Stop' | translate:locale.language"
+ class="btn btn-default app-top-menu-tool-bar__action--highlighted"
+ placement="top">
+ <svg [lucideIcon]="icons.LucideOctagonX"></svg>
</button>
}
- <button type="button" (click)="removeTasks()" class="btn btn-default">
+ <button type="button"
+ (click)="removeTasks()"
+ class="btn btn-default app-top-menu-tool-bar__action--highlighted">
<svg [lucideIcon]="icons.LucideX"></svg>
</button>
</div>
@@ -104,7 +110,7 @@
[tooltip]="'Stop' | translate:locale.language"
class="btn btn-sm btn-default task-list__cancel"
placement="top">
- <svg [lucideIcon]="icons.LucideSquare"></svg>
+ <svg [lucideIcon]="icons.LucideOctagonX"></svg>
</button>
}
</div>
diff --git a/frontend/src/app/applications/files/components/sidebar/files-tasks.component.ts b/frontend/src/app/applications/files/components/sidebar/files-tasks.component.ts
index c8b33002..8f119db7 100644
--- a/frontend/src/app/applications/files/components/sidebar/files-tasks.component.ts
+++ b/frontend/src/app/applications/files/components/sidebar/files-tasks.component.ts
@@ -16,7 +16,7 @@ import {
LucideGlobe,
LucideLoader,
LucideMove,
- LucideSquare,
+ LucideOctagonX,
LucideTrash2,
LucideX
} from '@lucide/angular'
@@ -43,7 +43,7 @@ import { TimeAgoPipe } from '../../../../common/pipes/time-ago.pipe'
})
export class FilesTasksComponent implements OnDestroy {
protected readonly locale = inject<L10nLocale>(L10N_LOCALE)
- protected readonly icons = { LucideX, LucideFlag, LucideClock, LucideFile, LucideFolderClosed, LucideSquare }
+ protected readonly icons = { LucideX, LucideFlag, LucideClock, LucideFile, LucideFolderClosed, LucideOctagonX }
protected readonly iconsStatus: Record<FileTaskStatus, LucideIcon> = {
[FileTaskStatus.PENDING]: LucideLoader,
[FileTaskStatus.SUCCESS]: LucideCheck,
diff --git a/frontend/src/app/applications/files/components/sidebar/files-tree.component.html b/frontend/src/app/applications/files/components/sidebar/files-tree.component.html
index 0bb61c2f..788cb477 100644
--- a/frontend/src/app/applications/files/components/sidebar/files-tree.component.html
+++ b/frontend/src/app/applications/files/components/sidebar/files-tree.component.html
@@ -1,9 +1,11 @@
@if (sideBarHeader) {
- <div class="sidebar-component-title justify-content-between position-relative">
+ <div class="sidebar-component-title app-top-menu-tool-bar justify-content-between position-relative">
<div class="sidebar-component-title-side"></div>
<div class="sidebar-component-title-label" l10nTranslate>Navigation</div>
<div class="sidebar-component-title-side">
- <button (click)="onRefresh()" class="btn btn-default" type="button">
+ <button (click)="onRefresh()"
+ class="btn btn-default app-top-menu-tool-bar__action--highlighted"
+ type="button">
<svg [lucideIcon]="icons.LucideRotateCw"></svg>
</button>
</div>
diff --git a/frontend/src/app/applications/files/components/viewers/files-viewer-editable-base.ts b/frontend/src/app/applications/files/components/viewers/files-viewer-editable-base.ts
index fc6a909e..76594126 100644
--- a/frontend/src/app/applications/files/components/viewers/files-viewer-editable-base.ts
+++ b/frontend/src/app/applications/files/components/viewers/files-viewer-editable-base.ts
@@ -1,7 +1,21 @@
import { HttpClient, HttpErrorResponse } from '@angular/common/http'
-import { AfterViewInit, Directive, effect, HostListener, inject, input, model, OnDestroy, output, signal, untracked } from '@angular/core'
+import {
+ AfterViewInit,
+ Directive,
+ effect,
+ HostListener,
+ inject,
+ input,
+ model,
+ OnDestroy,
+ output,
+ signal,
+ untracked,
+ viewChildren
+} from '@angular/core'
import type { FileLockProps } from '@sync-in-server/backend/src/applications/files/interfaces/file-props.interface'
import { L10N_LOCALE, L10nLocale } from 'angular-l10n'
+import { TooltipDirective } from 'ngx-bootstrap/tooltip'
import { firstValueFrom } from 'rxjs'
import { type AppWindow, themeDark } from '../../../../layout/layout.interfaces'
import { LayoutService } from '../../../../layout/layout.service'
@@ -25,6 +39,7 @@ export abstract class FilesViewerEditableBase implements AfterViewInit, OnDestro
protected currentTheme: 'dark' | 'light' = 'light'
protected readonly layout = inject(LayoutService)
protected readonly locale = inject<L10nLocale>(L10N_LOCALE)
+ private readonly tooltips = viewChildren(TooltipDirective)
private readonly http = inject(HttpClient)
private readonly filesServices = inject(FilesService)
private readonly filesUpload = inject(FilesUploadService)
@@ -131,6 +146,10 @@ export abstract class FilesViewerEditableBase implements AfterViewInit, OnDestro
return !document.activeElement?.closest('.files-viewer-search')
}
+ protected hideTooltips(): void {
+ this.tooltips().forEach((tooltip: TooltipDirective) => tooltip.hide())
+ }
+
protected isActiveDialog(): boolean {
return this.layout.isDialogActive(this.file().id)
}
diff --git a/frontend/src/app/applications/files/components/viewers/files-viewer-image.component.html b/frontend/src/app/applications/files/components/viewers/files-viewer-image.component.html
index ac1a18c3..18e7d2cd 100644
--- a/frontend/src/app/applications/files/components/viewers/files-viewer-image.component.html
+++ b/frontend/src/app/applications/files/components/viewers/files-viewer-image.component.html
@@ -1,41 +1,48 @@
-<div class="app-top-menu d-flex justify-content-between">
+<div class="app-top-menu app-top-menu-tool-bar d-flex justify-content-between"
+ [attr.aria-label]="'Actions' | translate:locale.language"
+ role="toolbar">
<div class="d-flex">
<button
(click)="previousImage()"
+ [attr.aria-label]="'Previous' | translate:locale.language"
[tooltip]="'Previous' | translate:locale.language"
[adaptivePosition]="true"
- class="btn btn-custom me-1"
+ class="btn btn-custom"
type="button">
<svg [lucideIcon]="icons.LucideChevronLeft"></svg>
</button>
<button
(click)="nextImage()"
+ [attr.aria-label]="'Next' | translate:locale.language"
[tooltip]="'Next' | translate:locale.language"
- class="btn btn-custom me-1"
+ class="btn btn-custom"
type="button">
<svg [lucideIcon]="icons.LucideChevronRight"></svg>
</button>
@if (!isSlideshowActive()) {
<button
(click)="startSlideshow()"
+ [attr.aria-label]="'Start Slideshow' | translate:locale.language"
[tooltip]="'Start Slideshow' | translate:locale.language"
- class="btn btn-custom me-1"
+ class="btn btn-custom"
type="button">
<svg [lucideIcon]="icons.LucidePlay"></svg>
</button>
} @else {
<button
(click)="stopSlideshow()"
+ [attr.aria-label]="'Stop slideshow' | translate:locale.language"
[tooltip]="'Stop slideshow' | translate:locale.language"
- class="btn btn-custom me-1"
+ class="btn btn-custom"
type="button">
<svg [lucideIcon]="icons.LucideSquare"></svg>
</button>
}
<button
(click)="fullscreen()"
+ [attr.aria-label]="'Fullscreen' | translate:locale.language"
[tooltip]="'Fullscreen' | translate:locale.language"
- class="btn btn-custom me-1"
+ class="btn btn-custom"
type="button">
<svg [lucideIcon]="icons.LucideExpand"></svg>
</button>
@@ -43,9 +50,10 @@
<div class="px-2">{{ imageIndex() + 1 }}<span class="px-1" l10nTranslate>of</span>{{ imageCount() }}</div>
<button
btnCheckbox
+ [attr.aria-label]="'Info' | translate:locale.language"
[(ngModel)]="isInfoboxOpen"
[tooltip]="'Info' | translate:locale.language"
- class="d-none d-sm-block btn btn-custom me-1"
+ class="d-none d-sm-block btn btn-custom"
type="button">
<svg [lucideIcon]="icons.LucideInfo"></svg>
</button>
diff --git a/frontend/src/app/applications/files/components/viewers/files-viewer-markdown.component.html b/frontend/src/app/applications/files/components/viewers/files-viewer-markdown.component.html
index 3008276e..00c26020 100644
--- a/frontend/src/app/applications/files/components/viewers/files-viewer-markdown.component.html
+++ b/frontend/src/app/applications/files/components/viewers/files-viewer-markdown.component.html
@@ -1,20 +1,27 @@
<div class="files-viewer-markdown" [style.height.px]="currentHeight()">
- <div class="app-top-menu files-markdown-toolbar">
+ <div (pointerdown)="hideTooltips()"
+ class="app-top-menu app-top-menu-tool-bar files-markdown-toolbar"
+ [attr.aria-label]="'Actions' | translate:locale.language"
+ role="toolbar">
<button
(click)="toggleReadonly()"
+ [attr.aria-label]="(isReadonly() || !isWriteable() ? 'Read-only' : 'Read-write') | translate:locale.language"
[tooltip]="(isReadonly() || !isWriteable() ? 'Read-only' : 'Read-write') | translate:locale.language"
+ triggers="hover"
[adaptivePosition]="true"
- class="btn {{ isReadonly() ? 'btn-warning' : 'btn-default' }} me-1"
+ class="btn {{ isReadonly() ? 'btn-warning' : 'btn-default' }}"
type="button"
[disabled]="!isSupported() || !isWriteable() || isSaving()">
<svg [lucideIcon]="isReadonly() ? icons.LucideLock : icons.LucideLockOpen"></svg>
</button>
<button
(click)="save()"
+ [attr.aria-label]="'Save' | translate:locale.language"
[tooltip]="(canSave() ? 'Save' : undefined) | translate:locale.language"
+ triggers="hover"
[delay]="0"
[isDisabled]="!canSave()"
- class="btn btn-default me-1"
+ class="btn btn-default app-top-menu-tool-bar__action--icon app-top-menu-tool-bar__action--quiet"
type="button"
[disabled]="!canSave()">
@if (isSaving()) {
@@ -25,26 +32,31 @@
</button>
<button
(click)="onUndo()"
+ [attr.aria-label]="'Undo' | translate:locale.language"
[disabled]="!canUndo()"
[tooltip]="'Undo' | translate:locale.language"
- class="d-none d-sm-block btn btn-custom me-1"
+ triggers="hover"
+ class="d-none d-sm-block btn btn-custom"
type="button">
<svg [lucideIcon]="icons.LucideUndo"></svg>
</button>
<button
(click)="onRedo()"
+ [attr.aria-label]="'Redo' | translate:locale.language"
[disabled]="!canRedo()"
[tooltip]="'Redo' | translate:locale.language"
- class="d-none d-sm-block btn btn-custom me-1"
+ triggers="hover"
+ class="d-none d-sm-block btn btn-custom"
type="button">
<svg [lucideIcon]="icons.LucideRedo"></svg>
</button>
<div class="files-markdown-mode-group">
- <div class="vr files-markdown-mode-separator files-markdown-mode-separator-start"></div>
<button
(click)="toggleViewMode()"
+ [attr.aria-label]="(isSourceMode() ? 'Visual Mode' : 'Code Mode') | translate:locale.language"
[tooltip]="(isSourceMode() ? 'Visual Mode' : 'Code Mode') | translate:locale.language"
+ triggers="hover"
class="btn btn-custom mx-0"
type="button">
<svg [lucideIcon]="isSourceMode() ? icons.LucideEye : icons.LucideKeyboard"></svg>
@@ -56,9 +68,11 @@
<div class="files-markdown-toolbar-group">
<div class="btn-group" dropdown>
<button
+ [attr.aria-label]="'Heading' | translate:locale.language"
[disabled]="!canEditVisual()"
[class.active]="isSelectionActive('heading')"
[tooltip]="'Heading' | translate:locale.language"
+ triggers="hover"
class="btn btn-custom dropdown-toggle files-markdown-heading-toggle"
dropdownToggle
type="button">
@@ -76,36 +90,44 @@
</div>
<button
(click)="toggleBold()"
+ [attr.aria-label]="'Bold' | translate:locale.language"
[disabled]="!canEditVisual()"
[class.active]="isSelectionActive('bold')"
[tooltip]="'Bold' | translate:locale.language"
+ triggers="hover"
class="btn btn-custom"
type="button">
<svg [lucideIcon]="icons.LucideBold"></svg>
</button>
<button
(click)="toggleItalic()"
+ [attr.aria-label]="'Italic' | translate:locale.language"
[disabled]="!canEditVisual()"
[class.active]="isSelectionActive('italic')"
[tooltip]="'Italic' | translate:locale.language"
+ triggers="hover"
class="btn btn-custom"
type="button">
<svg [lucideIcon]="icons.LucideItalic"></svg>
</button>
<button
(click)="toggleUnderline()"
+ [attr.aria-label]="'Underline' | translate:locale.language"
[disabled]="!canEditVisual()"
[class.active]="isSelectionActive('underline')"
[tooltip]="'Underline' | translate:locale.language"
+ triggers="hover"
class="d-none d-md-block btn btn-custom"
type="button">
<svg [lucideIcon]="icons.LucideUnderline"></svg>
</button>
<button
(click)="toggleStrike()"
+ [attr.aria-label]="'Strikethrough' | translate:locale.language"
[disabled]="!canEditVisual()"
[class.active]="isSelectionActive('strike')"
[tooltip]="'Strikethrough' | translate:locale.language"
+ triggers="hover"
class="d-none d-md-block btn btn-custom"
type="button">
<svg [lucideIcon]="icons.LucideStrikethrough"></svg>
@@ -115,9 +137,11 @@
<div class="btn-group" dropdown>
<button
+ [attr.aria-label]="'List' | translate:locale.language"
[disabled]="!canEditVisual()"
[class.active]="editor.isActive('bulletList') || editor.isActive('orderedList') || editor.isActive('taskList')"
[tooltip]="'List' | translate:locale.language"
+ triggers="hover"
class="btn btn-custom dropdown-toggle"
dropdownToggle
type="button">
@@ -153,9 +177,11 @@
<div class="btn-group" dropdown>
<button
+ [attr.aria-label]="'Code' | translate:locale.language"
[disabled]="!canEditVisual()"
[class.active]="editor.isActive('code') || editor.isActive('codeBlock')"
[tooltip]="'Code' | translate:locale.language"
+ triggers="hover"
class="btn btn-custom dropdown-toggle"
dropdownToggle
type="button">
@@ -182,12 +208,14 @@
</div>
</div>
- <div class="files-markdown-toolbar-group me-1">
+ <div class="files-markdown-toolbar-group">
<button
(click)="toggleBlockquote()"
+ [attr.aria-label]="'Blockquote' | translate:locale.language"
[disabled]="!canEditVisual()"
[class.active]="isSelectionActive('blockquote')"
[tooltip]="'Blockquote' | translate:locale.language"
+ triggers="hover"
class="d-none d-md-block btn btn-custom"
type="button">
<svg [lucideIcon]="icons.LucideQuote"></svg>
@@ -197,9 +225,11 @@
<div class="files-markdown-toolbar-group">
<div class="d-none d-lg-block btn-group" dropdown>
<button
+ [attr.aria-label]="'Table' | translate:locale.language"
[disabled]="!canEditVisual()"
[class.active]="editor.isActive('table')"
[tooltip]="'Table' | translate:locale.language"
+ triggers="hover"
class="btn btn-custom dropdown-toggle"
dropdownToggle
type="button">
@@ -253,8 +283,10 @@
<button
(click)="setHorizontalRule()"
+ [attr.aria-label]="'Horizontal Rule' | translate:locale.language"
[disabled]="!canEditVisual()"
[tooltip]="'Horizontal Rule' | translate:locale.language"
+ triggers="hover"
class="d-none d-lg-block btn btn-custom"
type="button">
<svg [lucideIcon]="icons.LucideMinus"></svg>
@@ -262,9 +294,11 @@
<button
(click)="setLink()"
+ [attr.aria-label]="'Link' | translate:locale.language"
[disabled]="!canEditVisual()"
[class.active]="isSelectionActive('link')"
[tooltip]="'Link' | translate:locale.language"
+ triggers="hover"
class="btn btn-custom"
type="button">
<svg [lucideIcon]="icons.LucideLink"></svg>
@@ -272,9 +306,11 @@
<div class="btn-group" dropdown>
<button
+ [attr.aria-label]="'Image' | translate:locale.language"
[disabled]="!canEditVisual()"
[class.active]="isSelectionActive('image')"
[tooltip]="'Image' | translate:locale.language"
+ triggers="hover"
class="btn btn-custom dropdown-toggle"
dropdownToggle
type="button">
@@ -307,9 +343,11 @@
@if (isSourceMode()) {
<button
btnCheckbox
+ [attr.aria-label]="'Line Wrap' | translate:locale.language"
[ngModel]="lineWrapping()"
(ngModelChange)="lineWrapping.set($event)"
[tooltip]="'Line Wrap' | translate:locale.language"
+ triggers="hover"
class="btn btn-custom"
type="button">
<svg [lucideIcon]="icons.LucideTextWrap"></svg>
@@ -318,23 +356,25 @@
<div class="d-none d-sm-block vr files-markdown-toolbar-separator"></div>
<button
btnCheckbox
+ [attr.aria-label]="'Search' | translate:locale.language"
[ngModel]="isSearchPanelOpen()"
(ngModelChange)="toggleSearch()"
[tooltip]="'Search' | translate:locale.language"
- class="d-none d-sm-block btn btn-custom me-1"
+ triggers="hover"
+ class="d-none d-sm-block btn btn-custom"
type="button">
<svg [lucideIcon]="icons.LucideSearch"></svg>
</button>
@if (warnOnUnsavedChanges()) {
<button (click)="save(true)"
- class="btn btn-sm btn-primary me-2 ms-auto"
+ class="btn btn-sm btn-primary ms-auto"
type="button"
l10nTranslate>Save And Exit
</button>
<button (click)="onClose()"
[disabled]="isSaving()"
- class="btn btn-sm btn-danger me-2"
+ class="btn btn-sm btn-danger"
data-dismiss="modal" type="button"
l10nTranslate>Close Without Saving
</button>
diff --git a/frontend/src/app/applications/files/components/viewers/files-viewer-markdown.component.scss b/frontend/src/app/applications/files/components/viewers/files-viewer-markdown.component.scss
index ae2ebe36..60a0cc39 100644
--- a/frontend/src/app/applications/files/components/viewers/files-viewer-markdown.component.scss
+++ b/frontend/src/app/applications/files/components/viewers/files-viewer-markdown.component.scss
@@ -7,9 +7,9 @@
.files-markdown-toolbar {
position: relative;
z-index: 3;
- flex: 0 0 auto !important;
+ flex: 0 0 auto;
flex-wrap: nowrap;
- gap: 4px 0;
+ row-gap: 4px;
overflow: visible;
}
@@ -30,11 +30,6 @@
margin: 0 0.5rem 0 0.3rem;
}
- .files-markdown-mode-separator-start {
- margin-left: 0.1rem;
- margin-right: 0.5rem;
- }
-
.files-markdown-mode-separator-end {
margin-left: 0.5rem;
margin-right: 0.5rem;
@@ -394,3 +389,14 @@ body.theme-dark {
}
}
}
+
+body.theme-light {
+ .files-viewer-markdown .files-markdown-toolbar {
+ --app-top-menu-action-active-bg: var(--app-top-menu-action-hover-bg);
+
+ .btn-custom:is(.active, :active, [aria-pressed='true']):not(:disabled) {
+ box-shadow: none !important;
+ color: var(--bs-body-color) !important;
+ }
+ }
+}
diff --git a/frontend/src/app/applications/files/components/viewers/files-viewer-text.component.html b/frontend/src/app/applications/files/components/viewers/files-viewer-text.component.html
index a7cdfee6..6ea861ee 100644
--- a/frontend/src/app/applications/files/components/viewers/files-viewer-text.component.html
+++ b/frontend/src/app/applications/files/components/viewers/files-viewer-text.component.html
@@ -1,20 +1,27 @@
<div class="files-viewer-text" [style.height.px]="currentHeight()">
- <div class="app-top-menu">
+ <div (pointerdown)="hideTooltips()"
+ class="app-top-menu app-top-menu-tool-bar"
+ [attr.aria-label]="'Actions' | translate:locale.language"
+ role="toolbar">
<button
(click)="toggleReadonly()"
+ [attr.aria-label]="(isReadonly() || !isWriteable() ? 'Read-only' : 'Read-write') | translate:locale.language"
[tooltip]="(isReadonly() || !isWriteable() ? 'Read-only' : 'Read-write') | translate:locale.language"
+ triggers="hover"
[adaptivePosition]="true"
- class="btn {{ isReadonly() ? 'btn-warning' : 'btn-default' }} me-1"
+ class="btn {{ isReadonly() ? 'btn-warning' : 'btn-default' }}"
type="button"
[disabled]="!isSupported() || !isWriteable() || isSaving()">
<svg [lucideIcon]="isReadonly() ? icons.LucideLock : icons.LucideLockOpen"></svg>
</button>
<button
(click)="save()"
+ [attr.aria-label]="'Save' | translate:locale.language"
[tooltip]="(canSave() ? 'Save' : undefined) | translate:locale.language"
+ triggers="hover"
[delay]="0"
[isDisabled]="!canSave()"
- class="btn btn-default me-1"
+ class="btn btn-default app-top-menu-tool-bar__action--icon app-top-menu-tool-bar__action--quiet"
type="button"
[disabled]="!canSave()">
@if (isSaving()) {
@@ -25,47 +32,55 @@
</button>
<button
(click)="onUndo()"
+ [attr.aria-label]="'Undo' | translate:locale.language"
[disabled]="!canUndo()"
[tooltip]="'Undo' | translate:locale.language"
- class="d-none d-sm-block btn btn-custom me-1"
+ triggers="hover"
+ class="d-none d-sm-block btn btn-custom"
type="button">
<svg [lucideIcon]="icons.LucideUndo"></svg>
</button>
<button
(click)="onRedo()"
+ [attr.aria-label]="'Redo' | translate:locale.language"
[disabled]="!canRedo()"
[tooltip]="'Redo' | translate:locale.language"
- class="d-none d-sm-block btn btn-custom me-1"
+ triggers="hover"
+ class="d-none d-sm-block btn btn-custom"
type="button">
<svg [lucideIcon]="icons.LucideRedo"></svg>
</button>
<button
btnCheckbox
+ [attr.aria-label]="'Line Wrap' | translate:locale.language"
[ngModel]="lineWrapping()"
(ngModelChange)="lineWrapping.set($event)"
[tooltip]="'Line Wrap' | translate:locale.language"
- class="btn btn-custom me-1"
+ triggers="hover"
+ class="btn btn-custom"
type="button">
<svg [lucideIcon]="icons.LucideTextWrap"></svg>
</button>
<button
btnCheckbox
+ [attr.aria-label]="'Search' | translate:locale.language"
[ngModel]="isSearchPanelOpen()"
(ngModelChange)="toggleSearch()"
[tooltip]="'Search' | translate:locale.language"
+ triggers="hover"
class="d-none d-sm-block btn btn-custom"
type="button">
<svg [lucideIcon]="icons.LucideSearch"></svg>
</button>
@if (warnOnUnsavedChanges()) {
<button (click)="save(true)"
- class="btn btn-sm btn-primary me-2 ms-auto"
+ class="btn btn-sm btn-primary ms-auto"
type="button"
l10nTranslate>Save And Exit
</button>
<button (click)="onClose()"
[disabled]="isSaving()"
- class="btn btn-sm btn-danger me-2"
+ class="btn btn-sm btn-danger"
data-dismiss="modal" type="button"
l10nTranslate>Close Without Saving
</button>
diff --git a/frontend/src/app/applications/links/components/links.component.html b/frontend/src/app/applications/links/components/links.component.html
index 9aeef979..1ca5d7dd 100644
--- a/frontend/src/app/applications/links/components/links.component.html
+++ b/frontend/src/app/applications/links/components/links.component.html
@@ -1,32 +1,39 @@
<!--Start Top Menu-->
-<div class="app-top-menu">
- <button (click)="openLinkDialog()"
- [disabled]="!selected" class="btn btn-default me-1"
- [tooltip]="'Edit link' | translate:locale.language"
- type="button">
- <svg [lucideIcon]="icons.LucidePencil"></svg>
- </button>
+<div class="app-top-menu app-top-menu-tool-bar"
+ [attr.aria-label]="'Actions' | translate:locale.language"
+ role="toolbar">
<button (click)="copyToClipboard()"
+ [attr.aria-label]="'Copy link' | translate:locale.language"
[disabled]="!selected"
- class="btn me-1 {{linkWasCopied ? 'btn-primary' : 'btn-default'}}"
- [tooltip]="'Copy link' | translate:locale.language"
+ class="btn {{linkWasCopied ? 'btn-primary' : 'btn-default'}} app-top-menu-tool-bar__action--quiet app-top-menu-tool-bar__action--highlighted"
type="button">
<svg [lucideIcon]="linkWasCopied? icons.LucideClipboardCheck : icons.LucideClipboard"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>Copy link</span>
+ </button>
+ <button (click)="openLinkDialog()"
+ [attr.aria-label]="'Edit link' | translate:locale.language"
+ [disabled]="!selected"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet"
+ type="button">
+ <svg [lucideIcon]="icons.LucidePencil"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>Edit link</span>
</button>
<button (click)="goTo()"
+ [attr.aria-label]="'Go to' | translate:locale.language"
[disabled]="!selected"
class="btn btn-default"
[tooltip]="'Go to' | translate:locale.language"
type="button">
<svg [lucideIcon]="icons.LucideMapPin"></svg>
</button>
+ <button (click)="loadShareLinks()"
+ [attr.aria-label]="'Refresh' | translate:locale.language"
+ class="d-none d-sm-block btn btn-default"
+ [tooltip]="'Refresh' | translate:locale.language"
+ type="button">
+ <svg [lucideIcon]="icons.LucideRotateCw" [class]="loading ? 'icon-spin' : ''"></svg>
+ </button>
<div class="d-flex align-items-center ms-auto">
- <button (click)="loadShareLinks()"
- class="d-none d-sm-block btn btn-default me-1"
- [tooltip]="'Refresh' | translate:locale.language"
- type="button">
- <svg [lucideIcon]="icons.LucideRotateCw" [class]="loading ? 'icon-spin' : ''"></svg>
- </button>
<!--Start View Button-->
<app-navigation-view (switchView)="galleryMode = $event">
</app-navigation-view>
diff --git a/frontend/src/app/applications/notifications/components/sidebar/notifications.component.html b/frontend/src/app/applications/notifications/components/sidebar/notifications.component.html
index b040ee90..59fcc51d 100644
--- a/frontend/src/app/applications/notifications/components/sidebar/notifications.component.html
+++ b/frontend/src/app/applications/notifications/components/sidebar/notifications.component.html
@@ -1,4 +1,4 @@
-<div class="sidebar-component-title justify-content-between position-relative">
+<div class="sidebar-component-title app-top-menu-tool-bar justify-content-between position-relative">
<div class="sidebar-component-title-side">
@if (store.notifications().length) {
<div class="badge bg-warning">{{ store.notifications().length }}</div>
@@ -7,7 +7,9 @@
<div class="sidebar-component-title-label" l10nTranslate>Notifications</div>
<div class="sidebar-component-title-side">
@if (store.notifications().length) {
- <button (click)="removeAll()" class="btn btn-default" type="button">
+ <button (click)="removeAll()"
+ class="btn btn-default app-top-menu-tool-bar__action--highlighted"
+ type="button">
<svg [lucideIcon]="icons.LucideTrash2"></svg>
</button>
}
diff --git a/frontend/src/app/applications/shares/components/shared.component.html b/frontend/src/app/applications/shares/components/shared.component.html
index ea8e5a21..12309396 100644
--- a/frontend/src/app/applications/shares/components/shared.component.html
+++ b/frontend/src/app/applications/shares/components/shared.component.html
@@ -1,39 +1,46 @@
<!--Start Top Menu-->
-<div class="app-top-menu">
+<div class="app-top-menu app-top-menu-tool-bar"
+ [attr.aria-label]="'Actions' | translate:locale.language"
+ role="toolbar">
<button (click)="openShareDialog(true)"
- class="btn btn-default me-1"
- [tooltip]="'New share' | translate:locale.language"
+ [attr.aria-label]="'New share' | translate:locale.language"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet app-top-menu-tool-bar__action--highlighted"
type="button">
<svg [lucideIcon]="icons.LucidePlus"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>New share</span>
</button>
<button (click)="openShareDialog()"
+ [attr.aria-label]="'Edit share' | translate:locale.language"
[disabled]="!selected"
- class="btn btn-default me-1"
- [tooltip]="'Edit share' | translate:locale.language"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet"
type="button">
<svg [lucideIcon]="icons.LucidePencil"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>Edit share</span>
</button>
<button (click)="openChildShareDialog()"
+ [attr.aria-label]="'Edit children shares' | translate:locale.language"
[disabled]="!selected?.counts.shares"
- class="btn btn-default me-1"
+ class="btn btn-default"
[tooltip]="'Edit children shares' | translate:locale.language"
type="button">
<svg [lucideIcon]="icons.SHARES"></svg>
</button>
<button (click)="goTo()"
+ [attr.aria-label]="'Go to' | translate:locale.language"
[disabled]="!selected"
- class="btn btn-default me-1"
+ class="btn btn-default"
[tooltip]="'Go to' | translate:locale.language"
type="button">
<svg [lucideIcon]="icons.LucideMapPin"></svg>
</button>
+ <button (click)="loadShares()"
+ [attr.aria-label]="'Refresh' | translate:locale.language"
+ class="d-none d-sm-block btn btn-default"
+ [tooltip]="'Refresh' | translate:locale.language"
+ type="button">
+ <svg [lucideIcon]="icons.LucideRotateCw" [class]="loading ? 'icon-spin' : ''"></svg>
+ </button>
<div class="d-flex align-items-center ms-auto">
- <button (click)="loadShares()"
- class="d-none d-sm-block btn btn-default me-1"
- [tooltip]="'Refresh' | translate:locale.language"
- type="button">
- <svg [lucideIcon]="icons.LucideRotateCw" [class]="loading ? 'icon-spin' : ''"></svg>
- </button>
<!--Start View Button-->
<app-navigation-view (switchView)="galleryMode = $event">
</app-navigation-view>
diff --git a/frontend/src/app/applications/spaces/components/spaces-browser.component.html b/frontend/src/app/applications/spaces/components/spaces-browser.component.html
index 546462e5..a0b7ea00 100644
--- a/frontend/src/app/applications/spaces/components/spaces-browser.component.html
+++ b/frontend/src/app/applications/spaces/components/spaces-browser.component.html
@@ -1,65 +1,84 @@
<!--Start Top Menu-->
-<div class="app-top-menu">
- <!--Start New Button-->
+<div class="app-top-menu app-top-menu-tool-bar"
+ [attr.aria-label]="'Actions' | translate:locale.language"
+ role="toolbar">
@if (!isTrashRepo && !inSharesList) {
- <div (onShown)="initUpload()" class="btn-group me-1" dropdown>
- <button dropdownToggle
- class="btn btn-default dropdown-toggle"
- [tooltip]="'New' | translate:locale.language"
+ <span #uploadFilesPicker="appUploadFiles"
+ (uploadFiles)="onUploadFiles($event)"
+ [options]="{isMultiple: true}"
+ appUploadFiles
+ class="d-none"></span>
+ @if (supportUploadFolder) {
+ <span #uploadFoldersPicker="appUploadFiles"
+ (uploadFiles)="onUploadFiles($event, true)"
+ [options]="{isDirectory: true}"
+ appUploadFiles
+ class="d-none"></span>
+ }
+ <!--Start New Button-->
+ <div class="btn-group">
+ <button (click)="openNewDialog()"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet app-top-menu-tool-bar__action--highlighted"
+ [attr.aria-label]="'New' | translate:locale.language"
type="button">
<svg [lucideIcon]="icons.LucidePlus"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>New</span>
+ </button>
+ </div>
+ <!--End New Button-->
+ <!--Start Upload Button-->
+ <div class="btn-group" dropdown>
+ <button dropdownToggle
+ class="btn btn-default dropdown-toggle app-top-menu-tool-bar__action--quiet"
+ [attr.aria-label]="'Upload' | translate:locale.language"
+ type="button">
+ <svg [lucideIcon]="icons.LucideHardDriveUpload"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>Upload</span>
</button>
<ul *dropdownMenu class="dropdown-menu" role="menu">
<li role="menuitem">
- <a (click)="openNewDialog('directory')" class="dropdown-item">
- <span l10nTranslate><svg [lucideIcon]="icons.PERSONAL"></svg>New folder</span>
+ <a (click)="shortcutUploadFiles()" class="dropdown-item">
+ <span l10nTranslate><svg [lucideIcon]="icons.LucideFileUp"></svg>Upload files</span>
</a>
</li>
- <li role="menuitem">
- <a (click)="openNewDialog('file')" class="dropdown-item">
- <span l10nTranslate><svg [lucideIcon]="icons.LucideFileText"></svg>New document</span>
- </a>
- </li>
- <li class="dropdown-divider"></li>
- <li role="menuitem">
- <a appUploadFiles [options]="{isMultiple: true}" (uploadFiles)="onUploadFiles($event)" class="dropdown-item" id="uploadFilesButton">
- <span l10nTranslate><svg [lucideIcon]="icons.LucideHardDriveUpload"></svg>Upload files</span>
- </a>
- @if (supportUploadFolder) {
- <a appUploadFiles
- [options]="{isDirectory: true}"
- (uploadFiles)="onUploadFiles($event, true)"
- class="dropdown-item"
- id="uploadFoldersButton">
- <span l10nTranslate><svg [lucideIcon]="icons.LucideHardDriveUpload"></svg>Upload folders</span>
+ @if (supportUploadFolder) {
+ <li role="menuitem">
+ <a (click)="shortcutUploadFolders()" class="dropdown-item">
+ <span l10nTranslate><svg [lucideIcon]="icons.LucideFolderUp"></svg>Upload folders</span>
</a>
- }
- </li>
+ </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>
+ <span l10nTranslate><svg [lucideIcon]="icons.LucideGlobe"></svg>Import from URL</span>
</a>
</li>
</ul>
</div>
+ <!--End Upload Button-->
+ }
+ @if (inSharesList) {
+ <button (click)="shortcutOpen()"
+ [attr.aria-label]="'Open' | translate:locale.language"
+ [disabled]="selection.length !== 1"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet app-top-menu-tool-bar__action--highlighted"
+ type="button">
+ <svg [lucideIcon]="selection[0]?.isDir ? icons.LucideFolderOpen : icons.LucideEye"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>Open</span>
+ </button>
}
- <!--End New Button-->
- <button (click)="downloadFiles()"
- [disabled]="!hasSelection || hasDisabledItemsInSelection"
- class="btn btn-default me-1"
- [tooltip]="'Download' | translate:locale.language"
- type="button">
- <svg [lucideIcon]="icons.LucideHardDriveDownload"></svg>
- </button>
<!--Start Share Button-->
- @if (!isTrashRepo && canShare.outside || inSharesList) {
- <div class="d-none d-sm-block btn-group me-1" [isDisabled]="!hasSelection || inSharesList && !selection[0].canBeReShared" dropdown>
+ @if (!isTrashRepo && !inSharesList && canShare.outside) {
+ <div class="btn-group"
+ [isDisabled]="!hasSelection"
+ dropdown>
<button dropdownToggle
- class="btn btn-default dropdown-toggle"
- [tooltip]="'Share' | translate:locale.language"
+ class="btn btn-default dropdown-toggle app-top-menu-tool-bar__action--quiet"
+ [attr.aria-label]="'Share' | translate:locale.language"
type="button">
<svg [lucideIcon]="icons.SHARED"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>Share</span>
</button>
<ul *dropdownMenu class="dropdown-menu" role="menu">
<li role="menuitem">
@@ -85,25 +104,31 @@
<!--End Share Button-->
@if (isTrashRepo) {
<button (click)="openTrashDialog(true)"
+ [attr.aria-label]="'Remove' | translate:locale.language"
[disabled]="!hasSelection"
- class="btn btn-default me-1"
- [tooltip]="'Remove' | translate:locale.language"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet"
type="button">
<svg [lucideIcon]="icons.LucideBan"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>Remove</span>
</button>
@if (inRootSpace) {
<button (click)="openEmptyTrashDialog()"
+ [attr.aria-label]="'Empty' | translate:locale.language"
[disabled]="!stats.elements"
- class="btn btn-default me-1"
- [tooltip]="'Empty' | translate:locale.language"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet"
type="button">
<svg [lucideIcon]="icons.TRASH"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>Empty</span>
</button>
}
}
<!--Start Actions Button-->
- <div [isDisabled]="!hasSelection" class="btn-group me-1" dropdown>
- <button class="btn btn-default dropdown-toggle" dropdownToggle type="button">
+ <div [isDisabled]="!hasSelection" class="btn-group" dropdown>
+ <button class="btn btn-default dropdown-toggle app-top-menu-tool-bar__action--icon app-top-menu-tool-bar__action--quiet"
+ [attr.aria-label]="'Actions' | translate:locale.language"
+ [tooltip]="'Actions' | translate:locale.language"
+ dropdownToggle
+ type="button">
<svg [lucideIcon]="icons.LucideEllipsis"></svg>
</button>
<ul *dropdownMenu class="dropdown-menu" role="menu">
@@ -116,11 +141,32 @@
</li>
}
}
+ <li role="menuitem">
+ <a (click)="downloadFiles()"
+ [attr.aria-disabled]="hasDisabledItemsInSelection"
+ [class.disabled]="hasDisabledItemsInSelection"
+ class="dropdown-item">
+ <span l10nTranslate><svg [lucideIcon]="icons.LucideHardDriveDownload"></svg>Download</span>
+ </a>
+ </li>
<li role="menuitem">
<a (click)="layout.showRSideBarTab(TAB_MENU.SELECTION)" class="dropdown-item">
<span l10nTranslate><svg [lucideIcon]="icons.SELECTION"></svg>View selection</span>
</a>
</li>
+ @if (inSharesList && selection.length === 1 && selection[0]?.canBeReShared) {
+ <li class="dropdown-divider"></li>
+ <li role="menuitem">
+ <a (click)="openShareDialog()" class="dropdown-item">
+ <span l10nTranslate><svg [lucideIcon]="icons.SHARED"></svg>New share</span>
+ </a>
+ </li>
+ <li role="menuitem">
+ <a (click)="openShareLinkDialog()" class="dropdown-item">
+ <span l10nTranslate><svg [lucideIcon]="icons.LucideLink"></svg>New share link</span>
+ </a>
+ </li>
+ }
<li class="dropdown-divider"></li>
@if (!hasDisabledItemsInSelection) {
<li role="menuitem">
@@ -167,10 +213,10 @@
</a>
</li>
}
- @if (selection.length === 1 && canManageFavorite) {
+ @if (selection.length === 1 && canManageFavorite && selection[0]; as selectedFile) {
<li role="menuitem">
- <a (click)="toggleFavorite(selection[0])" class="dropdown-item">
- @if (selection[0].isFavorite) {
+ <a (click)="toggleFavorite(selectedFile)" class="dropdown-item">
+ @if (selectedFile.isFavorite) {
<span l10nTranslate><svg [lucideIcon]="icons.FAVORITES"></svg>Remove from favorites</span>
} @else {
<span l10nTranslate><svg [lucideIcon]="icons.FAVORITES"></svg>Add to favorites</span>
@@ -200,13 +246,14 @@
</ul>
</div>
<!--End Actions Button-->
- <div class="d-flex align-items-center ms-auto">
- <button (click)="loadFiles()"
- class="d-none d-sm-block btn btn-default me-1"
- [tooltip]="'Refresh' | translate:locale.language"
- type="button">
- <svg [lucideIcon]="icons.LucideRotateCw" [class]="loading ? 'icon-spin' : ''"></svg>
- </button>
+ <button (click)="loadFiles()"
+ [attr.aria-label]="'Refresh' | translate:locale.language"
+ [tooltip]="'Refresh' | translate:locale.language"
+ class="btn btn-default app-top-menu-tool-bar__action--icon app-top-menu-tool-bar__action--quiet"
+ type="button">
+ <svg [lucideIcon]="icons.LucideRotateCw" [class]="loading ? 'icon-spin' : ''"></svg>
+ </button>
+ <div class="d-flex align-items-center ms-auto app-top-menu-tool-bar__utilities">
<!--Start View Button-->
<app-navigation-view (switchView)="switchView($event)">
</app-navigation-view>
@@ -637,9 +684,9 @@
<span l10nTranslate><svg [lucideIcon]="icons.LucideMessageSquareMore"></svg>Comment</span>
</ng-template>
}
- @if (selection.length === 1 && canManageFavorite) {
- <ng-template (execute)="toggleFavorite(selection[0])" contextMenuItem>
- @if (selection[0].isFavorite) {
+ @if (selection.length === 1 && canManageFavorite && selection[0]; as selectedFile) {
+ <ng-template (execute)="toggleFavorite(selectedFile)" contextMenuItem>
+ @if (selectedFile.isFavorite) {
<span l10nTranslate><svg [lucideIcon]="icons.FAVORITES"></svg>Remove from favorites</span>
} @else {
<span l10nTranslate><svg [lucideIcon]="icons.FAVORITES"></svg>Add to favorites</span>
@@ -693,14 +740,14 @@
<span l10nTranslate><svg [lucideIcon]="icons.LucideFileText"></svg>New document</span>
</ng-template>
<ng-template (execute)="openNewDialog('download')" contextMenuItem>
- <span l10nTranslate><svg [lucideIcon]="icons.LucideGlobe"></svg>Download from URL</span>
+ <span l10nTranslate><svg [lucideIcon]="icons.LucideGlobe"></svg>Import from URL</span>
</ng-template>
<ng-template (execute)="shortcutUploadFiles()" contextMenuItem>
- <span l10nTranslate><svg [lucideIcon]="icons.LucideHardDriveUpload"></svg>Upload files</span>
+ <span l10nTranslate><svg [lucideIcon]="icons.LucideFileUp"></svg>Upload files</span>
</ng-template>
@if (supportUploadFolder) {
<ng-template (execute)="shortcutUploadFolders()" contextMenuItem>
- <span l10nTranslate><svg [lucideIcon]="icons.LucideHardDriveUpload"></svg>Upload folders</span>
+ <span l10nTranslate><svg [lucideIcon]="icons.LucideFolderUp"></svg>Upload folders</span>
</ng-template>
}
}
diff --git a/frontend/src/app/applications/spaces/components/spaces-browser.component.ts b/frontend/src/app/applications/spaces/components/spaces-browser.component.ts
index c6ed8948..312e77a5 100644
--- a/frontend/src/app/applications/spaces/components/spaces-browser.component.ts
+++ b/frontend/src/app/applications/spaces/components/spaces-browser.component.ts
@@ -15,7 +15,9 @@ import {
LucideEye,
LucideFileArchive,
LucideFileText,
+ LucideFileUp,
LucideFolderOpen,
+ LucideFolderUp,
LucideGlobe,
LucideHardDriveDownload,
LucideHardDriveUpload,
@@ -125,6 +127,8 @@ export class SpacesBrowserComponent implements OnInit, AfterViewInit, OnDestroy
@ViewChild('MainContextMenu', { static: true }) mainContextMenu: ContextMenuComponent<any>
@ViewChild('MainReadOnlyContextMenu', { static: true }) mainReadOnlyContextMenu: ContextMenuComponent<any>
@ViewChild('FileContextMenu', { static: true }) fileContextMenu: ContextMenuComponent<any>
+ @ViewChild('uploadFilesPicker') private uploadFilesPicker: UploadFilesDirective | undefined
+ @ViewChild('uploadFoldersPicker') private uploadFoldersPicker: UploadFilesDirective | undefined
protected readonly locale = inject<L10nLocale>(L10N_LOCALE)
protected readonly layout = inject(LayoutService)
protected readonly navbarSearch = inject(NavbarSearchService)
@@ -141,6 +145,8 @@ export class SpacesBrowserComponent implements OnInit, AfterViewInit, OnDestroy
LucidePlus,
LucideCirclePlus,
LucideFileText,
+ LucideFileUp,
+ LucideFolderUp,
LucideGlobe,
LucideHardDriveUpload,
LucideHardDriveDownload,
@@ -251,7 +257,6 @@ export class SpacesBrowserComponent implements OnInit, AfterViewInit, OnDestroy
private baseRepoUrl: string
private currentRoute: string
private isPersonalSpace: boolean
- private uploadButtonsShowed = false
// Others
private subscriptions: Subscription[] = []
private focusOnSelect: string
@@ -460,20 +465,11 @@ export class SpacesBrowserComponent implements OnInit, AfterViewInit, OnDestroy
}
shortcutUploadFiles() {
- if (!this.uploadButtonsShowed) {
- const newButton = document.getElementById('newButton')
- newButton.click()
- }
- setTimeout(() => document.getElementById('uploadFilesButton').click(), 100)
+ this.uploadFilesPicker?.open()
}
shortcutUploadFolders() {
- if (!this.uploadButtonsShowed) {
- const newButton = document.getElementById('newButton')
- newButton.click()
- newButton.click()
- }
- setTimeout(() => document.getElementById('uploadFoldersButton').click(), 100)
+ this.uploadFoldersPicker?.open()
}
shortcutRename() {
@@ -586,12 +582,6 @@ export class SpacesBrowserComponent implements OnInit, AfterViewInit, OnDestroy
})
}
- initUpload() {
- if (!this.isTrashRepo && !this.uploadButtonsShowed) {
- this.uploadButtonsShowed = true
- }
- }
-
async onUploadFiles(ev: { files: File[] }, isDirectory = false) {
const selectedFiles = [...ev.files]
let exist: FileModel[] = []
@@ -634,7 +624,7 @@ export class SpacesBrowserComponent implements OnInit, AfterViewInit, OnDestroy
})
}
- openNewDialog(type: 'file' | 'directory' | 'download') {
+ openNewDialog(type: 'file' | 'directory' | 'download' = 'directory') {
this.layout.openDialog(FilesNewDialogComponent, null, { initialState: { files: this.files, inputType: type } as FilesNewDialogComponent })
}
diff --git a/frontend/src/app/applications/spaces/components/spaces.component.html b/frontend/src/app/applications/spaces/components/spaces.component.html
index 78982119..0105b3fc 100644
--- a/frontend/src/app/applications/spaces/components/spaces.component.html
+++ b/frontend/src/app/applications/spaces/components/spaces.component.html
@@ -1,41 +1,48 @@
<!--Start Top Menu-->
-<div class="app-top-menu">
+<div class="app-top-menu app-top-menu-tool-bar"
+ [attr.aria-label]="'Actions' | translate:locale.language"
+ role="toolbar">
@if (canCreateSpace) {
<button (click)="openSpaceDialog(true)"
- class="btn btn-default me-1"
- [tooltip]="'New space' | translate:locale.language"
+ [attr.aria-label]="'New space' | translate:locale.language"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet app-top-menu-tool-bar__action--highlighted"
type="button">
<svg [lucideIcon]="icons.LucidePlus"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>New space</span>
</button>
}
<button (click)="openSpaceDialog()"
+ [attr.aria-label]="'Edit space' | translate:locale.language"
[disabled]="!canEditSpace"
- class="btn btn-default me-1"
- [tooltip]="'Edit space' | translate:locale.language"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet"
type="button">
<svg [lucideIcon]="icons.LucidePencil"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>Edit space</span>
</button>
<button (click)="openChildShareDialog()"
+ [attr.aria-label]="'Edit children shares' | translate:locale.language"
[disabled]="!canEditSpace || !selected?.counts.shares"
- class="btn btn-default me-1"
+ class="btn btn-default"
[tooltip]="'Edit children shares' | translate:locale.language"
type="button">
<svg [lucideIcon]="icons.SHARES"></svg>
</button>
<button (click)="openSpaceRootsDialog()"
+ [attr.aria-label]="'Manage my anchored files' | translate:locale.language"
[disabled]="!canManageRoots"
- class="btn btn-default me-1"
+ class="btn btn-default"
[tooltip]="'Manage my anchored files' | translate:locale.language"
type="button">
<svg [lucideIcon]="icons.LucideAnchor"></svg>
</button>
+ <button (click)="loadSpaces()"
+ [attr.aria-label]="'Refresh' | translate:locale.language"
+ class="d-none d-sm-block btn btn-default"
+ [tooltip]="'Refresh' | translate:locale.language"
+ type="button">
+ <svg [lucideIcon]="icons.LucideRotateCw" [class]="loading ? 'icon-spin' : ''"></svg>
+ </button>
<div class="d-flex align-items-center ms-auto">
- <button (click)="loadSpaces()"
- class="d-none d-sm-block btn btn-default me-1"
- [tooltip]="'Refresh' | translate:locale.language"
- type="button">
- <svg [lucideIcon]="icons.LucideRotateCw" [class]="loading ? 'icon-spin' : ''"></svg>
- </button>
<!--Start View Button-->
<app-navigation-view (switchView)="galleryMode = $event">
</app-navigation-view>
diff --git a/frontend/src/app/applications/spaces/components/trash.component.html b/frontend/src/app/applications/spaces/components/trash.component.html
index f5054704..5eb8d044 100644
--- a/frontend/src/app/applications/spaces/components/trash.component.html
+++ b/frontend/src/app/applications/spaces/components/trash.component.html
@@ -1,12 +1,15 @@
<!--Start Top Menu-->
-<div class="app-top-menu">
+<div class="app-top-menu app-top-menu-tool-bar"
+ [attr.aria-label]="'Actions' | translate:locale.language"
+ role="toolbar">
+ <button (click)="loadTrashBins()"
+ [attr.aria-label]="'Refresh' | translate:locale.language"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet app-top-menu-tool-bar__action--highlighted"
+ type="button">
+ <svg [lucideIcon]="icons.LucideRotateCw" [class]="loading ? 'icon-spin' : ''"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>Refresh</span>
+ </button>
<div class="d-flex align-items-center ms-auto">
- <button (click)="loadTrashBins()"
- class="btn btn-default me-1"
- [tooltip]="'Refresh' | translate:locale.language"
- type="button">
- <svg [lucideIcon]="icons.LucideRotateCw" [class]="loading ? 'icon-spin' : ''"></svg>
- </button>
<!--Start View Button-->
<app-navigation-view (switchView)="galleryMode = $event">
</app-navigation-view>
diff --git a/frontend/src/app/applications/spaces/components/trash.component.ts b/frontend/src/app/applications/spaces/components/trash.component.ts
index 0bda6c39..e1268852 100644
--- a/frontend/src/app/applications/spaces/components/trash.component.ts
+++ b/frontend/src/app/applications/spaces/components/trash.component.ts
@@ -5,7 +5,6 @@ import { LucideArrowDown, LucideArrowUp, LucideDynamicIcon, LucideRotateCw } fro
import { ContextMenuComponent, ContextMenuModule } from '@perfectmemory/ngx-contextmenu'
import type { SpaceTrash } from '@sync-in-server/backend/src/applications/spaces/interfaces/space-trash.interface'
import { L10N_LOCALE, L10nLocale, L10nTranslateDirective, L10nTranslatePipe } from 'angular-l10n'
-import { TooltipModule } from 'ngx-bootstrap/tooltip'
import { NavigationViewComponent, ViewMode } from '../../../common/components/navigation-view/navigation-view.component'
import { VirtualScrollComponent } from '../../../common/components/virtual-scroll.component'
import { TapDirective } from '../../../common/directives/tap.directive'
@@ -27,7 +26,6 @@ import { SPACES_ICON, SPACES_PATH, SPACES_TITLE } from '../spaces.constants'
LucideDynamicIcon,
NavigationViewComponent,
L10nTranslatePipe,
- TooltipModule,
KeyValuePipe,
VirtualScrollComponent,
SearchFilterPipe,
diff --git a/frontend/src/app/applications/sync/components/sync-clients.component.html b/frontend/src/app/applications/sync/components/sync-clients.component.html
index 990e648a..a91a85cf 100644
--- a/frontend/src/app/applications/sync/components/sync-clients.component.html
+++ b/frontend/src/app/applications/sync/components/sync-clients.component.html
@@ -1,19 +1,21 @@
-<div class="app-top-menu">
+<div class="app-top-menu app-top-menu-tool-bar"
+ [attr.aria-label]="'Actions' | translate:locale.language"
+ role="toolbar">
+ <button (click)="loadClients()"
+ [attr.aria-label]="'Refresh' | translate:locale.language"
+ class="d-none d-sm-flex align-items-center justify-content-center btn btn-default app-top-menu-tool-bar__action--quiet app-top-menu-tool-bar__action--highlighted"
+ type="button">
+ <svg [lucideIcon]="icons.LucideRotateCw"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>Refresh</span>
+ </button>
<button (click)="onDeleteClient()"
+ [attr.aria-label]="'Delete' | translate:locale.language"
[disabled]="!selected"
- [tooltip]="'Remove' | translate:locale.language"
- class="btn btn-default me-1"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet ms-auto"
type="button">
<svg [lucideIcon]="icons.LucideTrash2"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>Delete</span>
</button>
- <div class="d-flex align-items-center ms-auto">
- <button (click)="loadClients()"
- [tooltip]="'Refresh' | translate:locale.language"
- class="d-none d-sm-flex align-items-center justify-content-center btn btn-default"
- type="button">
- <svg [lucideIcon]="icons.LucideRotateCw"></svg>
- </button>
- </div>
</div>
<div class="app-sync-clients" appAutoResize>
@for (client of clients; track client.id) {
diff --git a/frontend/src/app/applications/sync/components/sync-paths.component.html b/frontend/src/app/applications/sync/components/sync-paths.component.html
index 05364a2e..f23b8fec 100644
--- a/frontend/src/app/applications/sync/components/sync-paths.component.html
+++ b/frontend/src/app/applications/sync/components/sync-paths.component.html
@@ -1,46 +1,49 @@
-<div class="app-top-menu">
+<div class="app-top-menu app-top-menu-tool-bar"
+ [attr.aria-label]="'Actions' | translate:locale.language"
+ role="toolbar">
<button (click)="addToSync()"
- [tooltip]="'Add' | translate:locale.language"
- class="btn btn-default me-1" type="button">
+ [attr.aria-label]="'New' | translate:locale.language"
+ [tooltip]="'New' | translate:locale.language"
+ class="btn btn-default app-top-menu-tool-bar__action--icon app-top-menu-tool-bar__action--highlighted" type="button">
<svg [lucideIcon]="icons.LucidePlus"></svg>
</button>
<button (click)="openSettingsDialog()"
+ [attr.aria-label]="'Edit' | translate:locale.language"
[disabled]="!syncPathSelected"
[tooltip]="'Edit' | translate:locale.language"
- class="btn btn-default me-1" type="button">
+ class="btn btn-default app-top-menu-tool-bar__action--icon" type="button">
<svg [lucideIcon]="icons.LucidePencil"></svg>
</button>
- <button (click)="openReportDialog()"
- [disabled]="!syncPathSelected || !syncPathSelected.settings.enabled"
- [tooltip]="'Simulate' | translate:locale.language"
- class="btn btn-default me-1" type="button">
- <svg [lucideIcon]="icons.LucideFlaskConical"></svg>
- </button>
<!--Start Sync Buttons-->
@if (syncPathSelected && syncPathSelected.inSync) {
<button (click)="doSync(false)"
+ [attr.aria-label]="'Stop synchronization' | translate:locale.language"
[tooltip]="'Stop synchronization' | translate:locale.language"
- class="btn btn-warning me-1" type="button">
+ class="btn btn-warning app-top-menu-tool-bar__action--icon" type="button">
<svg [lucideIcon]="icons.LucideSquare"></svg>
</button>
} @else {
<button (click)="doSync(true)"
+ [attr.aria-label]="'Synchronize' | translate:locale.language"
[disabled]="!syncPathSelected || !syncPathSelected.settings.enabled"
[tooltip]="'Synchronize' | translate:locale.language"
- class="btn btn-default me-1" type="button">
+ class="btn btn-default app-top-menu-tool-bar__action--icon" type="button">
<svg [lucideIcon]="icons.LucidePlay"></svg>
</button>
}
@if (allSyncsRunning) {
<button (click)="doAllSyncs(false)"
+ [attr.aria-label]="'Stop synchronizations' | translate:locale.language"
[tooltip]="'Stop synchronizations' | translate:locale.language"
- class="btn btn-warning me-1" type="button">
+ class="btn btn-warning app-top-menu-tool-bar__action--icon" type="button">
<svg [lucideIcon]="icons.LucideSquare"></svg>
</button>
} @else {
<div [tooltip]="'Synchronize all' | translate:locale.language">
- <div class="btn-group me-1" dropdown [isDisabled]="!store.clientSyncPaths().length">
- <button class="btn btn-default dropdown-toggle" dropdownToggle type="button">
+ <div class="btn-group" dropdown [isDisabled]="!store.clientSyncPaths().length">
+ <button class="btn btn-default dropdown-toggle app-top-menu-tool-bar__action--icon"
+ [attr.aria-label]="'Synchronize all' | translate:locale.language"
+ dropdownToggle type="button">
<svg [lucideIcon]="icons.LucideFastForward"></svg>
</button>
<ul *dropdownMenu class="dropdown-menu" role="menu">
@@ -64,9 +67,18 @@
</div>
</div>
}
+ <button (click)="openReportDialog()"
+ [attr.aria-label]="'Simulate' | translate:locale.language"
+ [disabled]="!syncPathSelected || !syncPathSelected.settings.enabled"
+ [tooltip]="'Simulate' | translate:locale.language"
+ class="btn btn-default app-top-menu-tool-bar__action--icon" type="button">
+ <svg [lucideIcon]="icons.LucideFlaskConical"></svg>
+ </button>
<div [tooltip]="(('Scheduler' | translate:locale.language) + ': ' + (store.clientScheduler() | translate:locale.language))">
- <div class="btn-group me-1" dropdown>
- <button class="btn {{store.clientScheduler() === CLIENT_SCHEDULER_STATE.DISABLED ? 'btn-warning' : 'btn-success'}} dropdown-toggle" dropdownToggle type="button">
+ <div class="btn-group" dropdown>
+ <button class="btn {{store.clientScheduler() === CLIENT_SCHEDULER_STATE.DISABLED ? 'btn-warning' : 'btn-success'}} dropdown-toggle app-top-menu-tool-bar__action--icon"
+ [attr.aria-label]="(('Scheduler' | translate:locale.language) + ': ' + (store.clientScheduler() | translate:locale.language))"
+ dropdownToggle type="button">
@if (store.clientScheduler() === CLIENT_SCHEDULER_STATE.DISABLED) {
<svg [lucideIcon]="icons.LucideCalendarX"></svg>
} @else {
@@ -105,8 +117,10 @@
</div>
<!--End Sync Buttons-->
<div [tooltip]="'Go to' | translate:locale.language">
- <div [isDisabled]="!syncPathSelected" class="btn-group me-1" dropdown>
- <button class="btn btn-default dropdown-toggle" dropdownToggle type="button">
+ <div [isDisabled]="!syncPathSelected" class="btn-group" dropdown>
+ <button class="btn btn-default dropdown-toggle app-top-menu-tool-bar__action--icon"
+ [attr.aria-label]="'Go to' | translate:locale.language"
+ dropdownToggle type="button">
<svg [lucideIcon]="icons.LucideMapPin"></svg>
</button>
<ul *dropdownMenu class="dropdown-menu" role="menu">
@@ -129,10 +143,11 @@
</ul>
</div>
</div>
- <div class="d-flex align-items-center ms-auto">
+ <div class="d-flex align-items-center">
<button (click)="onRefresh()"
+ [attr.aria-label]="'Refresh' | translate:locale.language"
[tooltip]="'Refresh' | translate:locale.language"
- class="d-none d-sm-block btn btn-default" type="button">
+ class="d-none d-sm-block btn btn-default app-top-menu-tool-bar__action--icon" type="button">
<svg [lucideIcon]="icons.LucideRotateCw"></svg>
</button>
</div>
@@ -288,5 +303,5 @@
</span>
</ng-template>
<ng-template [divider]="true" contextMenuItem></ng-template>
- <ng-template (execute)="addToSync()" contextMenuItem><span l10nTranslate><svg [lucideIcon]="icons.LucidePlus"></svg>Add</span></ng-template>
+ <ng-template (execute)="addToSync()" contextMenuItem><span l10nTranslate><svg [lucideIcon]="icons.LucidePlus"></svg>New</span></ng-template>
</context-menu>
diff --git a/frontend/src/app/applications/sync/components/sync-transfers.component.html b/frontend/src/app/applications/sync/components/sync-transfers.component.html
index 01c3db8a..06aeaefc 100644
--- a/frontend/src/app/applications/sync/components/sync-transfers.component.html
+++ b/frontend/src/app/applications/sync/components/sync-transfers.component.html
@@ -1,4 +1,6 @@
-<div class="app-top-menu">
+<div class="app-top-menu app-top-menu-tool-bar"
+ [attr.aria-label]="'Actions' | translate:locale.language"
+ role="toolbar">
<div class="d-flex gap-2">
<select (ngModelChange)="onSelectPath($event)" [ngModel]="syncPathSelected" class="form-select" style="min-width: 210px">
<option [ngValue]="null" l10nTranslate>All syncs</option>
@@ -16,19 +18,22 @@
<option l10nTranslate value="ERROR">Error</option>
</select>
</div>
+ <button (click)="refresh()"
+ [attr.aria-label]="'Refresh' | translate:locale.language"
+ [tooltip]="'Refresh' | translate:locale.language"
+ class="btn btn-default"
+ type="button">
+ <svg [lucideIcon]="icons.LucideRotateCw"></svg>
+ </button>
<div class="d-flex align-items-center ms-auto">
- <button (click)="refresh()"
- [tooltip]="'Refresh' | translate:locale.language"
- class="btn btn-default me-1"
- type="button">
- <svg [lucideIcon]="icons.LucideRotateCw"></svg>
- </button>
<button (click)="openClearDialog()"
+ [attr.aria-label]="'Clear events' | translate:locale.language"
[tooltip]="'Clear events' | translate:locale.language"
placement="bottom"
- class="btn btn-default"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet"
type="button">
<svg [lucideIcon]="icons.LucideTrash2"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>Clear</span>
</button>
</div>
</div>
diff --git a/frontend/src/app/applications/sync/components/sync-transfers.component.ts b/frontend/src/app/applications/sync/components/sync-transfers.component.ts
index a52e6277..e4144ba7 100644
--- a/frontend/src/app/applications/sync/components/sync-transfers.component.ts
+++ b/frontend/src/app/applications/sync/components/sync-transfers.component.ts
@@ -43,7 +43,7 @@ export class SyncTransfersComponent {
protected tableHeaders: Record<'action' | 'sync' | 'file' | 'date', TableHeaderConfig> = {
action: {
label: 'Action',
- width: 8,
+ width: 10,
textCenter: false,
class: '',
show: true,
diff --git a/frontend/src/app/applications/sync/components/wizard/sync-wizard-server.component.html b/frontend/src/app/applications/sync/components/wizard/sync-wizard-server.component.html
index d0a38712..25b4f5ea 100644
--- a/frontend/src/app/applications/sync/components/wizard/sync-wizard-server.component.html
+++ b/frontend/src/app/applications/sync/components/wizard/sync-wizard-server.component.html
@@ -14,10 +14,14 @@
<span l10nTranslate>Please select the server directory to sync, if it doesn't exist you can create it.</span>
}
</div>
- <div class="app-top-menu px-0">
+ <div class="app-top-menu app-top-menu-tool-bar px-0"
+ [attr.aria-label]="'Actions' | translate:locale.language"
+ role="toolbar">
<button (click)="onBack()"
+ [attr.aria-label]="'Back' | translate:locale.language"
[disabled]="!currentPath"
- class="btn btn-default me-1"
+ [tooltip]="'Back' | translate:locale.language"
+ class="btn btn-default"
type="button">
<svg [lucideIcon]="icons.LucideCircleArrowLeft"></svg>
</button>
@@ -30,7 +34,9 @@
class="form-control"
[placeholder]="'New folder' | translate:locale.language" type="text">
<button (click)="addDirectory()"
+ [attr.aria-label]="'New folder' | translate:locale.language"
[disabled]="!canCreateDir || !newDirectoryName?.trim()"
+ [tooltip]="'New folder' | translate:locale.language"
class="btn btn-default input-group-text"
type="button">
<svg [lucideIcon]="icons.LucideFolderPlus"></svg>
diff --git a/frontend/src/app/applications/sync/components/wizard/sync-wizard-server.component.ts b/frontend/src/app/applications/sync/components/wizard/sync-wizard-server.component.ts
index 7e0d6c60..4f4190c2 100644
--- a/frontend/src/app/applications/sync/components/wizard/sync-wizard-server.component.ts
+++ b/frontend/src/app/applications/sync/components/wizard/sync-wizard-server.component.ts
@@ -6,6 +6,7 @@ import { LucideCircleArrowLeft, LucideCircleArrowRight, LucideDynamicIcon, Lucid
import { FileTree } from '@sync-in-server/backend/src/applications/files/interfaces/file-tree.interface'
import { USER_PERMISSION } from '@sync-in-server/backend/src/applications/users/constants/user'
import { L10N_LOCALE, L10nLocale, L10nTranslateDirective, L10nTranslatePipe } from 'angular-l10n'
+import { TooltipModule } from 'ngx-bootstrap/tooltip'
import { AutoResizeDirective } from '../../../../common/directives/auto-resize.directive'
import { LayoutService } from '../../../../layout/layout.service'
import { StoreService } from '../../../../store/store.service'
@@ -19,7 +20,7 @@ import { isSynchronizable } from '../../sync.utils'
@Component({
selector: 'app-sync-wizard-server',
- imports: [LucideDynamicIcon, L10nTranslateDirective, AutoResizeDirective, FormsModule, L10nTranslatePipe, ReactiveFormsModule],
+ imports: [LucideDynamicIcon, L10nTranslateDirective, AutoResizeDirective, FormsModule, L10nTranslatePipe, ReactiveFormsModule, TooltipModule],
templateUrl: 'sync-wizard-server.component.html'
})
export class SyncWizardServerComponent {
diff --git a/frontend/src/app/applications/sync/sync.constants.ts b/frontend/src/app/applications/sync/sync.constants.ts
index 0e5717df..10b3db87 100644
--- a/frontend/src/app/applications/sync/sync.constants.ts
+++ b/frontend/src/app/applications/sync/sync.constants.ts
@@ -1,4 +1,4 @@
-import { LucideArrowRightLeft, LucideMonitor, LucideRefreshCw, LucideServer, LucideWandSparkles } from '@lucide/angular'
+import { LucideArrowRightLeft, LucideLaptopMinimal, LucideRefreshCw, LucideServer, LucideWandSparkles } from '@lucide/angular'
import { SYNC_BASE_ROUTE, SYNC_ROUTE } from '@sync-in-server/backend/src/applications/sync/constants/routes'
import { USER_PERMISSION } from '@sync-in-server/backend/src/applications/users/constants/user'
import { BehaviorSubject } from 'rxjs'
@@ -20,7 +20,7 @@ export const SYNC_ICON = {
TRANSFERS: LucideArrowRightLeft,
WIZARD: LucideWandSparkles,
SERVER: LucideServer,
- CLIENT: LucideMonitor
+ CLIENT: LucideLaptopMinimal
} as const
export const SYNC_PATH = {
diff --git a/frontend/src/app/applications/users/components/dialogs/user-auth-2fa-enable-dialog.component.html b/frontend/src/app/applications/users/components/dialogs/user-auth-2fa-enable-dialog.component.html
index fe6b1cae..f849ee56 100644
--- a/frontend/src/app/applications/users/components/dialogs/user-auth-2fa-enable-dialog.component.html
+++ b/frontend/src/app/applications/users/components/dialogs/user-auth-2fa-enable-dialog.component.html
@@ -54,8 +54,8 @@
<div class="card-body p-3">
<form (ngSubmit)="onSubmit()" [formGroup]="twoFaForm" class="d-flex flex-column gap-3 align-items-center">
<div class="w-100" style="max-width: 360px;">
- <label class="form-label text-muted text-uppercase fs-sm d-block text-center mb-2" for="password" l10nTranslate>Enter your password</label>
- <app-input-password id="password"
+ <label class="form-label text-muted text-uppercase fs-sm d-block text-center mb-2" for="twoFaEnablePassword" l10nTranslate>Enter your password</label>
+ <app-input-password inputId="twoFaEnablePassword"
class="d-block w-100"
[password]="twoFaForm.value.password"
(passwordChange)="twoFaForm.controls.password.setValue($event)"
diff --git a/frontend/src/app/applications/users/components/dialogs/user-auth-2fa-verify-dialog.component.html b/frontend/src/app/applications/users/components/dialogs/user-auth-2fa-verify-dialog.component.html
index dd9b5d71..4f2cf209 100644
--- a/frontend/src/app/applications/users/components/dialogs/user-auth-2fa-verify-dialog.component.html
+++ b/frontend/src/app/applications/users/components/dialogs/user-auth-2fa-verify-dialog.component.html
@@ -14,8 +14,8 @@
<form (ngSubmit)="onSubmit()" [formGroup]="twoFaForm" class="d-flex flex-column gap-3 align-items-center">
@if (withPassword) {
<div class="w-100" style="max-width: 360px;">
- <label class="form-label text-muted text-uppercase fs-sm d-block text-center mb-2" for="password" l10nTranslate>Enter your password</label>
- <app-input-password id="password"
+ <label class="form-label text-muted text-uppercase fs-sm d-block text-center mb-2" for="twoFaVerifyPassword" l10nTranslate>Enter your password</label>
+ <app-input-password inputId="twoFaVerifyPassword"
class="d-block w-100"
[password]="twoFaForm.value.password"
(passwordChange)="updatePassword($event)"
diff --git a/frontend/src/app/applications/users/components/dialogs/user-group-delete-dialog.component.html b/frontend/src/app/applications/users/components/dialogs/user-group-delete-dialog.component.html
index c156e27c..6aff07d0 100644
--- a/frontend/src/app/applications/users/components/dialogs/user-group-delete-dialog.component.html
+++ b/frontend/src/app/applications/users/components/dialogs/user-group-delete-dialog.component.html
@@ -1,6 +1,6 @@
<div class="modal-header">
<h4 class="modal-title">
- <svg [lucideIcon]="member.isUser ? icons.LucideUserMinus : icons.LucideMinus"></svg>
+ <svg [lucideIcon]="member.isUser ? icons.LucideUserMinus : icons.LucideTrash2"></svg>
<span>{{ member.name }}</span>
</h4>
<h4 class="modal-title ms-auto">
@@ -41,4 +41,3 @@
Remove
</button>
</div>
-
diff --git a/frontend/src/app/applications/users/components/dialogs/user-group-delete-dialog.component.ts b/frontend/src/app/applications/users/components/dialogs/user-group-delete-dialog.component.ts
index ef9f9a18..0bb69d2f 100644
--- a/frontend/src/app/applications/users/components/dialogs/user-group-delete-dialog.component.ts
+++ b/frontend/src/app/applications/users/components/dialogs/user-group-delete-dialog.component.ts
@@ -1,6 +1,6 @@
import { HttpErrorResponse } from '@angular/common/http'
import { Component, EventEmitter, inject, Input, Output } from '@angular/core'
-import { LucideDynamicIcon, LucideMinus, LucideUserMinus } from '@lucide/angular'
+import { LucideDynamicIcon, LucideTrash2, LucideUserMinus } from '@lucide/angular'
import { L10nTranslateDirective } from 'angular-l10n'
import { CapitalizePipe } from '../../../../common/pipes/capitalize.pipe'
import { LayoutService } from '../../../../layout/layout.service'
@@ -19,7 +19,7 @@ export class UserGroupDeleteDialogComponent {
@Input({ required: true }) member: MemberModel
@Output() wasDeleted = new EventEmitter<boolean>()
protected submitted = false
- protected readonly icons = { GROUPS: USER_ICON.GROUPS, LucideMinus, LucideUserMinus }
+ protected readonly icons = { GROUPS: USER_ICON.GROUPS, LucideTrash2, LucideUserMinus }
private readonly layout = inject(LayoutService)
private readonly userService = inject(UserService)
diff --git a/frontend/src/app/applications/users/components/dialogs/user-guest-dialog.component.html b/frontend/src/app/applications/users/components/dialogs/user-guest-dialog.component.html
index 1dd63be6..7845ac96 100644
--- a/frontend/src/app/applications/users/components/dialogs/user-guest-dialog.component.html
+++ b/frontend/src/app/applications/users/components/dialogs/user-guest-dialog.component.html
@@ -78,14 +78,14 @@
<div class="card-body d-flex flex-column gap-3">
<div>
<div class="d-flex align-items-center gap-2 mb-1">
- <label class="form-label mb-0" for="password" l10nTranslate>Password</label>
+ <label class="form-label mb-0" for="guestPassword" l10nTranslate>Password</label>
@if (guestForm.value.password !== defaultPassword) {
<div class="d-flex align-items-center ms-auto">
<app-password-strength-bar [passwordToCheck]="guestForm.value.password"></app-password-strength-bar>
</div>
}
</div>
- <app-input-password id="password"
+ <app-input-password inputId="guestPassword"
class="w-100"
[password]="guestForm.value.password"
(passwordChange)="updatePassword($event)"
diff --git a/frontend/src/app/applications/users/components/sidebar/user-profile.component.html b/frontend/src/app/applications/users/components/sidebar/user-profile.component.html
index 1fe2de6f..20f45c03 100755
--- a/frontend/src/app/applications/users/components/sidebar/user-profile.component.html
+++ b/frontend/src/app/applications/users/components/sidebar/user-profile.component.html
@@ -1,23 +1,33 @@
<!-- The user image in the menu -->
<div class="d-flex flex-column">
- <div class="sidebar-component-title">
+ <div class="sidebar-component-title app-top-menu-tool-bar">
<div class="d-flex flex-fill justify-content-between">
@if (!user?.isLink) {
- <button class="btn btn-default" (click)="collapseRSideBar()" type="button" [routerLink]=USER_PATH.BASE>
+ <button class="btn btn-default"
+ (click)="collapseRSideBar()"
+ type="button"
+ [routerLink]=USER_PATH.BASE>
<svg [lucideIcon]="icons.LucideUserRound"></svg>
</button>
}
- <button class="btn btn-default" (click)="toggleTheme()" type="button">
+ <button class="btn btn-default"
+ (click)="toggleTheme()"
+ type="button">
<svg [lucideIcon]="icons.LucideContrast"></svg>
</button>
@if (user?.isAdmin) {
- <button class="btn btn-default" (click)="collapseRSideBar()" type="button" routerLink="/admin">
+ <button class="btn btn-default"
+ (click)="collapseRSideBar()"
+ type="button"
+ routerLink="/admin">
<svg [lucideIcon]="icons.LucideSettings"></svg>
</button>
}
@if (!store.isElectronApp() || store.isElectronApp() && store.userImpersonate()) {
- <button (click)="logOut()" class="btn btn-default" type="button">
- <svg [lucideIcon]="store.userImpersonate() ? icons.LucideVenetianMask : icons.LucidePower"></svg>
+ <button (click)="logOut()"
+ class="btn btn-default"
+ type="button">
+ <svg [lucideIcon]="store.userImpersonate() ? icons.LucideVenetianMask : icons.LucideLogOut"></svg>
</button>
}
</div>
diff --git a/frontend/src/app/applications/users/components/sidebar/user-profile.component.ts b/frontend/src/app/applications/users/components/sidebar/user-profile.component.ts
index e7e754fc..877e3f5f 100644
--- a/frontend/src/app/applications/users/components/sidebar/user-profile.component.ts
+++ b/frontend/src/app/applications/users/components/sidebar/user-profile.component.ts
@@ -4,9 +4,9 @@ import { RouterLink } from '@angular/router'
import {
LucideContrast,
LucideDynamicIcon,
+ LucideLogOut,
LucidePin,
LucidePinOff,
- LucidePower,
LucideSettings,
LucideUserRound,
LucideVenetianMask
@@ -36,7 +36,7 @@ export class UserProfileComponent implements OnDestroy {
protected readonly allOnlineStatus = USER_ONLINE_STATUS_LIST
protected readonly appVersion = APP_VERSION
protected appBaseUrl = `${APP_URL.WEBSITE}`
- protected readonly icons = { LucideUserRound, LucideContrast, LucideSettings, LucidePower, LucideVenetianMask, LucidePin, LucidePinOff }
+ protected readonly icons = { LucideUserRound, LucideContrast, LucideSettings, LucideLogOut, LucideVenetianMask, LucidePin, LucidePinOff }
protected user: UserType
protected userAvatar: string = null
protected readonly layout = inject(LayoutService)
diff --git a/frontend/src/app/applications/users/components/user-account.component.html b/frontend/src/app/applications/users/components/user-account.component.html
index d7e2f4ae..65a8266c 100755
--- a/frontend/src/app/applications/users/components/user-account.component.html
+++ b/frontend/src/app/applications/users/components/user-account.component.html
@@ -35,12 +35,12 @@
<div>
<div class="px-1 mt-4">
<div class="row g-2 align-items-center py-2 border-bottom border-secondary-subtle">
- <label for="" class="col-5 col-sm-4" l10nTranslate>Login</label>
+ <div class="col-5 col-sm-4" l10nTranslate>Login</div>
<span class="col-7 col-sm-8 text-end">{{ user.login }}</span>
</div>
<div class="row g-2 align-items-center py-2 border-bottom border-secondary-subtle">
- <label for="" class="col-5 col-sm-4" l10nTranslate>IP Addresses</label>
+ <div class="col-5 col-sm-4" l10nTranslate>IP Addresses</div>
<div class="col-7 col-sm-8 d-flex flex-wrap justify-content-end">
<span class="badge bg-warning">{{ user.currentIp }}</span>
<span class="badge bg-default ms-1">{{ user.lastIp }}</span>
@@ -48,7 +48,7 @@
</div>
<div class="row g-2 align-items-center py-2 border-bottom border-secondary-subtle">
- <label for="" class="col-5 col-sm-4" l10nTranslate>Connections</label>
+ <div class="col-5 col-sm-4" l10nTranslate>Connections</div>
<div class="col-7 col-sm-8 d-flex flex-wrap justify-content-end">
<span class="badge bg-warning">{{ user.currentAccess | amDateFormat }}</span>
<span class="badge bg-default ms-1">{{ user.lastAccess | amDateFormat }}</span>
@@ -57,7 +57,7 @@
@if (user.isUser) {
<div class="row g-2 align-items-center py-2 border-bottom border-secondary-subtle">
- <label for="" class="col-5 col-sm-4" l10nTranslate>Permissions</label>
+ <div class="col-5 col-sm-4" l10nTranslate>Permissions</div>
<div class="col-7 col-sm-8 d-flex flex-wrap justify-content-end">
@if (user.isAdmin) {
<span class="badge bg-purple">
@@ -73,7 +73,7 @@
</div>
<div class="row g-2 align-items-center py-2 border-bottom border-secondary-subtle">
- <label for="" class="col-5 col-sm-4" l10nTranslate>Storage Space</label>
+ <div class="col-5 col-sm-4" l10nTranslate>Storage Space</div>
<div class="col-7 col-sm-8 d-flex justify-content-end">
<app-storage-usage class="w-100" style="max-width: 18rem;" [item]="user"></app-storage-usage>
</div>
@@ -81,7 +81,7 @@
}
<div class="row g-2 align-items-center pt-2">
- <label for="" class="col-5 col-sm-4">WebDAV</label>
+ <div class="col-5 col-sm-4">WebDAV</div>
<div class="col-7 col-sm-8 text-end text-truncate">
<span
(click)="clipBoardLink()"
@@ -103,9 +103,10 @@
@if (showEditorPreference) {
<div class="row g-2 align-items-center mb-2">
- <label for="" class="col-12 col-sm-6" l10nTranslate>Document editor</label>
+ <label class="col-12 col-sm-6" for="documentEditor" l10nTranslate>Document editor</label>
<div class="col-12 col-sm-6">
<select
+ id="documentEditor"
class="form-select"
[ngModel]="userEditorPreference"
(ngModelChange)="updateEditorPreference($event)">
@@ -161,7 +162,7 @@
<div class="d-flex flex-column gap-2">
@if (user.isUser) {
<div class="row g-2 align-items-center">
- <label for="" class="form-label col-12 col-md-6 mb-0" l10nTranslate>Avatar</label>
+ <div class="form-label col-12 col-md-6 mb-0" l10nTranslate>Avatar</div>
<div class="col-12 col-md-6">
<div class="d-flex flex-wrap gap-2">
<button (click)="genAvatar()" class="btn btn-success" type="button" l10nTranslate>Generate</button>
@@ -216,19 +217,20 @@
<div class="d-flex flex-column gap-2">
@if (requiresCurrentPassword) {
<div class="row g-2 align-items-center">
- <label for="" class="form-label col-12 col-md-6 mb-0">{{ 'current password' | translate:locale.language | capitalize }}</label>
+ <label class="form-label col-12 col-md-6 mb-0" for="currentPassword">{{ 'current password' | translate:locale.language | capitalize }}</label>
<div class="col-12 col-md-6">
- <app-input-password [(password)]="oldPassword"></app-input-password>
+ <app-input-password inputId="currentPassword" [(password)]="oldPassword"></app-input-password>
</div>
</div>
}
<div class="row g-2 align-items-center">
- <label for="" class="form-label col-12 col-md-6 mb-0">
+ <label class="form-label col-12 col-md-6 mb-0" for="newPassword">
{{ (requiresCurrentPassword ? 'new password' : 'local password') | translate:locale.language | capitalize }}
</label>
<div class="col-12 col-md-6">
- <app-input-password [(password)]="newPassword"
+ <app-input-password inputId="newPassword"
+ [(password)]="newPassword"
[disabled]="requiresCurrentPassword && !oldPassword?.length"
[isRequired]="requiresCurrentPassword && !!oldPassword?.length"
[passwordMinLength]="passwordMinLength"
@@ -257,7 +259,7 @@
<div class="text-muted text-uppercase fs-sm text-bold mb-2" l10nTranslate>Security</div>
<div class="d-flex flex-column gap-3">
<div class="row g-2 align-items-center">
- <label for="" class="form-label col-12 col-md-6 mb-0" l10nTranslate>Two-Factor Authentication</label>
+ <div class="form-label col-12 col-md-6 mb-0" l10nTranslate>Two-Factor Authentication</div>
<div class="col-12 col-md-6 d-flex flex-wrap align-items-center gap-2">
<button (click)="enable2Fa()"
[disabled]="!store.server().twoFaEnabled"
@@ -279,7 +281,7 @@
</div>
<div class="row g-2 align-items-center">
- <label for="" class="form-label col-12 col-md-6 mb-0" l10nTranslate>Application Passwords</label>
+ <div class="form-label col-12 col-md-6 mb-0" l10nTranslate>Application Passwords</div>
<div class="col-12 col-md-6 d-flex align-items-center">
<button (click)="manageAppPasswords()"
class="btn btn-primary"
diff --git a/frontend/src/app/applications/users/components/user-applications.component.html b/frontend/src/app/applications/users/components/user-applications.component.html
index 79199e73..2091853d 100644
--- a/frontend/src/app/applications/users/components/user-applications.component.html
+++ b/frontend/src/app/applications/users/components/user-applications.component.html
@@ -1,4 +1,4 @@
-<div class="app-top-menu px-4 user-applications-topbar">
+<div class="app-top-menu app-top-menu-tool-bar px-4 user-applications-topbar">
@if (store.appStoreManifest()) {
<div class="d-flex flex-fill align-items-center flex-wrap gap-2">
<span class="d-none d-sm-block badge bg-default text-nowrap">
diff --git a/frontend/src/app/applications/users/components/user-groups.component.html b/frontend/src/app/applications/users/components/user-groups.component.html
index 53cb3651..9aefeb9f 100644
--- a/frontend/src/app/applications/users/components/user-groups.component.html
+++ b/frontend/src/app/applications/users/components/user-groups.component.html
@@ -1,31 +1,41 @@
<!--Start Top Menu-->
-<div class="app-top-menu">
+<div class="app-top-menu app-top-menu-tool-bar"
+ [attr.aria-label]="'Actions' | translate:locale.language"
+ role="toolbar">
<button (click)="openDialog(true)"
+ [attr.aria-label]="(!currentGroup && allowedAction.addGroup ? 'New personal group': 'Add members') | translate:locale.language"
[disabled]="!allowedAction.addGroup && !allowedAction.addUsers"
- class="btn btn-default me-1"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet app-top-menu-tool-bar__action--highlighted"
[tooltip]="(!currentGroup && allowedAction.addGroup ? 'New personal group': 'Add members') | translate:locale.language"
type="button">
<svg [lucideIcon]="icons.LucidePlus"></svg>
- </button>
- <button (click)="openDialog(false, true)"
- class="btn btn-default me-1"
- [disabled]="!allowedAction.removeGroup && !allowedAction.removeUser"
- [tooltip]="(allowedAction.removeGroup ? 'Delete group' : 'Remove from group') | translate:locale.language"
- type="button">
- <svg [lucideIcon]="icons.LucideMinus"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>New</span>
</button>
<button (click)="openDialog()"
+ [attr.aria-label]="(allowedAction.editGroup ? 'Edit group' : 'Edit user') | translate:locale.language"
[disabled]="!allowedAction.editGroup && !allowedAction.editUser"
- class="btn btn-default me-1"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet"
[tooltip]="(allowedAction.editGroup ? 'Edit group' : 'Edit user') | translate:locale.language"
type="button">
<svg [lucideIcon]="icons.LucidePencil"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>Edit</span>
+ </button>
+ <button (click)="openDialog(false, true)"
+ [attr.aria-label]="(allowedAction.removeGroup ? 'Delete group' : 'Remove from group') | translate:locale.language"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet"
+ [disabled]="!allowedAction.removeGroup && !allowedAction.removeUser"
+ [tooltip]="(allowedAction.removeGroup ? 'Delete group' : 'Remove from group') | translate:locale.language"
+ type="button">
+ <svg [lucideIcon]="allowedAction.removeUser ? icons.LucideUserMinus : icons.LucideTrash2"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>Delete</span>
</button>
@if (!currentGroup) {
- <div class="btn-group me-1" dropdown>
+ <div class="btn-group" dropdown>
<button dropdownToggle
+ [attr.aria-label]="'Actions' | translate:locale.language"
[class.disabled]="!selected"
class="btn btn-default dropdown-toggle"
+ [tooltip]="'Actions' | translate:locale.language"
type="button">
<svg [lucideIcon]="icons.LucideEllipsis"></svg>
</button>
@@ -43,8 +53,9 @@
</ul>
</div>
}
- <div class="d-flex align-items-center ms-auto">
+ <div class="d-flex align-items-center">
<button (click)="refresh()"
+ [attr.aria-label]="'Refresh' | translate:locale.language"
class="btn btn-default"
[tooltip]="'Refresh' | translate:locale.language"
type="button">
@@ -195,7 +206,7 @@
}
@if (allowedAction.removeGroup || allowedAction.removeUser) {
<ng-template (execute)="openDialog(false, true)" contextMenuItem>
- <span l10nTranslate><svg [lucideIcon]="icons.LucideMinus"></svg>
+ <span l10nTranslate><svg [lucideIcon]="allowedAction.removeUser ? icons.LucideUserMinus : icons.LucideTrash2"></svg>
{{ allowedAction.removeGroup ? 'Delete group' : 'Remove from group' }}</span>
</ng-template>
}
diff --git a/frontend/src/app/applications/users/components/user-groups.component.ts b/frontend/src/app/applications/users/components/user-groups.component.ts
index bdfb00ae..93702a67 100644
--- a/frontend/src/app/applications/users/components/user-groups.component.ts
+++ b/frontend/src/app/applications/users/components/user-groups.component.ts
@@ -9,10 +9,11 @@ import {
LucideEllipsis,
LucideKeyRound,
LucideLogOut,
- LucideMinus,
LucidePencil,
LucidePlus,
LucideRotateCw,
+ LucideTrash2,
+ LucideUserMinus,
LucideUsersRound
} from '@lucide/angular'
import { ContextMenuComponent, ContextMenuModule } from '@perfectmemory/ngx-contextmenu'
@@ -79,7 +80,8 @@ export class UserGroupsComponent {
GROUPS: USER_ICON.GROUPS,
LucideRotateCw,
LucidePlus,
- LucideMinus,
+ LucideTrash2,
+ LucideUserMinus,
LucidePencil,
LucideArrowDown,
LucideArrowUp,
diff --git a/frontend/src/app/applications/users/components/user-guests.component.html b/frontend/src/app/applications/users/components/user-guests.component.html
index 44c716fc..9d63c8bb 100644
--- a/frontend/src/app/applications/users/components/user-guests.component.html
+++ b/frontend/src/app/applications/users/components/user-guests.component.html
@@ -1,21 +1,26 @@
<!--Start Top Menu-->
-<div class="app-top-menu">
+<div class="app-top-menu app-top-menu-tool-bar"
+ [attr.aria-label]="'Actions' | translate:locale.language"
+ role="toolbar">
<button (click)="openGuestDialog(true)"
+ [attr.aria-label]="'New guest' | translate:locale.language"
[disabled]="!canCreateGuest"
- class="btn btn-default me-1"
- [tooltip]="'New guest' | translate:locale.language"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet app-top-menu-tool-bar__action--highlighted"
type="button">
<svg [lucideIcon]="icons.LucidePlus"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>New guest</span>
</button>
<button (click)="openGuestDialog()"
+ [attr.aria-label]="'Edit guest' | translate:locale.language"
[disabled]="!selected"
- class="btn btn-default me-1"
- [tooltip]="'Edit guest' | translate:locale.language"
+ class="btn btn-default app-top-menu-tool-bar__action--quiet"
type="button">
<svg [lucideIcon]="icons.LucidePencil"></svg>
+ <span class="app-top-menu-tool-bar__label" l10nTranslate>Edit guest</span>
</button>
- <div class="d-flex align-items-center ms-auto">
+ <div class="d-flex align-items-center">
<button (click)="loadGuests()"
+ [attr.aria-label]="'Refresh' | translate:locale.language"
class="btn btn-default"
[tooltip]="'Refresh' | translate:locale.language"
type="button">
diff --git a/frontend/src/app/applications/users/user.constants.ts b/frontend/src/app/applications/users/user.constants.ts
index b416fb43..95711099 100644
--- a/frontend/src/app/applications/users/user.constants.ts
+++ b/frontend/src/app/applications/users/user.constants.ts
@@ -1,4 +1,4 @@
-import { LucideContactRound, LucideHardDriveDownload, LucideLaptop, LucideUserRound, LucideUsersRound } from '@lucide/angular'
+import { LucideLaptopMinimal, LucideStore, LucideUserRound, LucideUserRoundGroup, LucideUsersRound } from '@lucide/angular'
import { USER_PERMISSION } from '@sync-in-server/backend/src/applications/users/constants/user'
import { AppMenu } from '../../layout/layout.interfaces'
@@ -29,10 +29,10 @@ export const USER_ONLINE_STATUS_LIST = ['available', 'busy', 'absent', 'offline'
export const USER_ICON = {
ACCOUNT: LucideUserRound,
- CLIENTS: LucideLaptop,
+ CLIENTS: LucideLaptopMinimal,
GROUPS: LucideUsersRound,
- GUESTS: LucideContactRound,
- APPS: LucideHardDriveDownload
+ GUESTS: LucideUserRoundGroup,
+ APPS: LucideStore
} as const
export const USER_PASSWORD_CHANGE_TEXT = 'Change me !'
diff --git a/frontend/src/app/common/components/input-password.component.ts b/frontend/src/app/common/components/input-password.component.ts
index 7bb3cc51..1b05cbab 100644
--- a/frontend/src/app/common/components/input-password.component.ts
+++ b/frontend/src/app/common/components/input-password.component.ts
@@ -6,15 +6,18 @@ import { genPassword } from '@sync-in-server/backend/src/common/shared'
import { L10N_LOCALE, L10nLocale, L10nTranslateDirective, L10nTranslatePipe } from 'angular-l10n'
import { togglePasswordType } from '../utils/functions'
+let nextInputPasswordId = 0
+
@Component({
selector: 'app-input-password',
imports: [FormsModule, ReactiveFormsModule, L10nTranslatePipe, LucideDynamicIcon, L10nTranslateDirective],
template: `@if (showLabel) {
- <label for="password" class="form-label" l10nTranslate>Password</label>
+ <label [for]="inputId" class="form-label" l10nTranslate>Password</label>
}
- <div id="password" class="input-group" style="min-width: 150px">
+ <div class="input-group" style="min-width: 150px">
<input
#Password
+ [id]="inputId"
autocomplete="off"
[(ngModel)]="password"
[disabled]="disabled"
@@ -52,6 +55,7 @@ export class InputPasswordComponent implements OnInit {
@Output() passwordChange = new EventEmitter<string>()
@Input() passwordMinLength = USER_PASSWORD_MIN_LENGTH
@Input() placeholder: string | null = null
+ @Input() inputId = `input-password-${nextInputPasswordId++}`
@Input() showGenerator = false
@Input() showLabel = false
@Input() disabled = false
diff --git a/frontend/src/app/common/components/navigation-view/navigation-view.component.html b/frontend/src/app/common/components/navigation-view/navigation-view.component.html
index 854a7686..f576ba89 100644
--- a/frontend/src/app/common/components/navigation-view/navigation-view.component.html
+++ b/frontend/src/app/common/components/navigation-view/navigation-view.component.html
@@ -1,17 +1,22 @@
-<div #viewDropdown="bs-dropdown" [insideClick]="true" aria-label="Display mode" class="btn-group" dropdown role="group">
+<div #viewDropdown="bs-dropdown"
+ aria-label="Display mode"
+ [insideClick]="true"
+ class="btn-group view-switch navigation-view-switch"
+ dropdown
+ role="group">
<button (click)="setView('tl'); viewDropdown.hide()"
+ aria-label="List view"
[attr.aria-pressed]="!galleryModeEnabled"
[class.active]="!galleryModeEnabled"
- aria-label="List view"
- class="btn btn-default navigation-view-direct-option"
+ class="view-switch__option"
type="button">
<svg [lucideIcon]="icons.LucideList"></svg>
</button>
<button (click)="selectGalleryMode()"
+ aria-label="Gallery view and size options"
[attr.aria-pressed]="galleryModeEnabled"
[class.active]="galleryModeEnabled"
- aria-label="Gallery view and size options"
- class="btn btn-default dropdown-toggle navigation-view-direct-option"
+ class="view-switch__option dropdown-toggle"
dropdownToggle
type="button">
<svg [lucideIcon]="icons.LucideGrid2x2"></svg>
diff --git a/frontend/src/app/common/components/navigation-view/navigation-view.component.scss b/frontend/src/app/common/components/navigation-view/navigation-view.component.scss
index be702402..c18d36c6 100644
--- a/frontend/src/app/common/components/navigation-view/navigation-view.component.scss
+++ b/frontend/src/app/common/components/navigation-view/navigation-view.component.scss
@@ -3,9 +3,15 @@
padding: .5rem;
}
-.btn.navigation-view-direct-option.active,
-.btn.navigation-view-direct-option.active:hover:not(:disabled) {
- background-color: rgba(var(--bs-primary-rgb), .12) !important;
+.navigation-view-switch {
+ > .view-switch__option {
+ min-width: 2.5rem;
+ padding-inline: .6rem;
+
+ .lucide {
+ font-size: 1rem;
+ }
+ }
}
.navigation-view-size-selector {
diff --git a/frontend/src/app/common/directives/upload-files.directive.ts b/frontend/src/app/common/directives/upload-files.directive.ts
index b12f694b..df39ed2f 100644
--- a/frontend/src/app/common/directives/upload-files.directive.ts
+++ b/frontend/src/app/common/directives/upload-files.directive.ts
@@ -1,44 +1,48 @@
import { Directive, ElementRef, EventEmitter, inject, Input, OnDestroy, OnInit, Output, Renderer2 } from '@angular/core'
-@Directive({ selector: '[appUploadFiles]' })
+@Directive({ selector: '[appUploadFiles]', exportAs: 'appUploadFiles' })
export class UploadFilesDirective implements OnInit, OnDestroy {
@Input() options: { isMultiple?: boolean; isDirectory?: boolean }
@Output() uploadFiles = new EventEmitter<{ files: File[]; isDirectory: boolean }>()
private elementRef = inject(ElementRef)
private readonly renderer = inject(Renderer2)
- private eventElement: () => void | undefined
- private eventInput: () => void | undefined
+ private fileInput: HTMLInputElement | undefined
+ private removeElementListener: (() => void) | undefined
+ private removeInputListener: (() => void) | undefined
ngOnInit() {
- const input = document.createElement('input')
- this.renderer.setAttribute(input, 'type', 'file')
- this.renderer.setStyle(input, 'display', 'none')
- this.renderer.setStyle(input, 'position', 'absolute')
- this.elementRef.nativeElement.appendChild(input)
+ this.fileInput = this.renderer.createElement('input')
+ this.renderer.setAttribute(this.fileInput, 'type', 'file')
+ this.renderer.setStyle(this.fileInput, 'display', 'none')
+ this.renderer.setStyle(this.fileInput, 'position', 'absolute')
+ this.renderer.appendChild(this.elementRef.nativeElement, this.fileInput)
- this.eventElement = this.renderer.listen(this.elementRef.nativeElement, 'click', () => input.click())
+ this.removeElementListener = this.renderer.listen(this.elementRef.nativeElement, 'click', (event: MouseEvent) => {
+ if (event.target !== this.fileInput) this.open()
+ })
if (this.options?.isMultiple) {
- this.renderer.setAttribute(input, 'multiple', 'multiple')
+ this.renderer.setAttribute(this.fileInput, 'multiple', 'multiple')
}
if (this.options?.isDirectory) {
- this.renderer.setAttribute(input, 'webkitdirectory', 'webkitdirectory')
+ this.renderer.setAttribute(this.fileInput, 'webkitdirectory', 'webkitdirectory')
}
- this.eventInput = this.renderer.listen(input, 'change', (e: any) => {
- if (e.target.value) {
- this.uploadFiles.next({ files: e.target.files, isDirectory: this.options?.isDirectory || false })
- e.target.value = ''
+ this.removeInputListener = this.renderer.listen(this.fileInput, 'change', (event: Event) => {
+ const input = event.target as HTMLInputElement
+ if (input.files?.length) {
+ this.uploadFiles.next({ files: Array.from(input.files), isDirectory: this.options?.isDirectory || false })
+ input.value = ''
}
})
}
+ open() {
+ this.fileInput?.click()
+ }
+
ngOnDestroy() {
- try {
- this.eventElement()
- this.eventInput()
- } catch (e) {
- console.warn(e)
- }
+ this.removeElementListener?.()
+ this.removeInputListener?.()
}
}
diff --git a/frontend/src/app/layout/sidebar/components/selection.component.html b/frontend/src/app/layout/sidebar/components/selection.component.html
index 38ea3bc5..def675dc 100644
--- a/frontend/src/app/layout/sidebar/components/selection.component.html
+++ b/frontend/src/app/layout/sidebar/components/selection.component.html
@@ -1,10 +1,10 @@
-<div class="sidebar-component-title justify-content-between position-relative">
+<div class="sidebar-component-title app-top-menu-tool-bar justify-content-between position-relative">
<div class="sidebar-component-title-side"></div>
<div class="sidebar-component-title-label" l10nTranslate>Selection</div>
<div class="sidebar-component-title-side">
@if (selectionType() === SPACES_PATH.FILES && store.filesSelection().length > 1) {
<button (click)="clearSelection()"
- class="btn btn-default"
+ class="btn btn-default app-top-menu-tool-bar__action--highlighted"
type="button"
aria-label="Clear selection">
<svg [lucideIcon]="LucideX"></svg>
diff --git a/frontend/src/app/layout/sidebar/components/windows.component.html b/frontend/src/app/layout/sidebar/components/windows.component.html
index cba9cbbc..db518e49 100755
--- a/frontend/src/app/layout/sidebar/components/windows.component.html
+++ b/frontend/src/app/layout/sidebar/components/windows.component.html
@@ -1,9 +1,12 @@
-<div class="sidebar-component-title justify-content-between position-relative">
+<div class="sidebar-component-title app-top-menu-tool-bar justify-content-between position-relative">
<div class="sidebar-component-title-side"></div>
<div class="sidebar-component-title-label" l10nTranslate>Windows Manager</div>
<div class="sidebar-component-title-side">
@if (windows.length) {
- <button (click)="onCloseAll()" class="btn btn-default" type="button" aria-label="Close all windows">
+ <button (click)="onCloseAll()"
+ class="btn btn-default app-top-menu-tool-bar__action--highlighted"
+ type="button"
+ aria-label="Close all windows">
<svg [lucideIcon]="icons.LucideX"></svg>
</button>
}
diff --git a/frontend/src/i18n/de.json b/frontend/src/i18n/de.json
index 539a5350..12dbaef4 100644
--- a/frontend/src/i18n/de.json
+++ b/frontend/src/i18n/de.json
@@ -200,6 +200,7 @@
"No favorites": "Keine Favoriten",
"Add to favorites": "Zu Favoriten hinzufügen",
"Remove from favorites": "Aus Favoriten entfernen",
+ "Unfavorite": "Entfernen",
"No longer accessible": "Nicht mehr zugänglich",
"Not supported on this kind of location": "Für diese Art von Speicherort nicht unterstützt",
"Trash": "Papierkorb",
@@ -370,8 +371,9 @@
"Modified": "Geändert",
"modified": "geändert",
"Tasks": "Aufgaben",
- "Download from URL": "Von URL herunterladen",
+ "Import from URL": "Von URL importieren",
"URL (https://...)": "URL (https://...)",
+ "Upload": "Hochladen",
"Upload files": "Dateien hochladen",
"Upload folders": "Ordner hochladen",
"Folder name": "Ordnername",
diff --git a/frontend/src/i18n/es.json b/frontend/src/i18n/es.json
index 75e515d2..edfd3472 100644
--- a/frontend/src/i18n/es.json
+++ b/frontend/src/i18n/es.json
@@ -200,6 +200,7 @@
"No favorites": "No hay favoritos",
"Add to favorites": "Añadir a favoritos",
"Remove from favorites": "Quitar de favoritos",
+ "Unfavorite": "Quitar",
"No longer accessible": "Ya no es accesible",
"Not supported on this kind of location": "No compatible con este tipo de ubicación",
"Trash": "Papelera",
@@ -370,8 +371,9 @@
"Modified": "Modificado",
"modified": "modificado",
"Tasks": "Tareas",
- "Download from URL": "Descargar desde una URL",
+ "Import from URL": "Importar desde una URL",
"URL (https://...)": "URL (https://...)",
+ "Upload": "Enviar",
"Upload files": "Enviar archivos",
"Upload folders": "Enviar carpetas",
"Folder name": "Nombre de la carpeta",
diff --git a/frontend/src/i18n/fr.json b/frontend/src/i18n/fr.json
index f01c7922..3262114e 100644
--- a/frontend/src/i18n/fr.json
+++ b/frontend/src/i18n/fr.json
@@ -200,6 +200,7 @@
"No favorites": "Aucun favori",
"Add to favorites": "Ajouter aux favoris",
"Remove from favorites": "Retirer des favoris",
+ "Unfavorite": "Retirer",
"No longer accessible": "N’est plus accessible",
"Not supported on this kind of location": "Non pris en charge pour ce type d’emplacement",
"Trash": "Corbeille",
@@ -370,8 +371,9 @@
"Modified": "Modifié",
"modified": "modifié",
"Tasks": "Tâches",
- "Download from URL": "Télécharger depuis une URL",
+ "Import from URL": "Importer depuis une URL",
"URL (https://...)": "URL (https://...)",
+ "Upload": "Envoyer",
"Upload files": "Envoyer des fichiers",
"Upload folders": "Envoyer des dossiers",
"Folder name": "Nom du dossier",
diff --git a/frontend/src/i18n/hi.json b/frontend/src/i18n/hi.json
index 78e917e7..e596f65f 100644
--- a/frontend/src/i18n/hi.json
+++ b/frontend/src/i18n/hi.json
@@ -200,6 +200,7 @@
"No favorites": "कोई पसंदीदा नहीं",
"Add to favorites": "पसंदीदा में जोड़ें",
"Remove from favorites": "पसंदीदा से हटाएँ",
+ "Unfavorite": "हटाएँ",
"No longer accessible": "अब पहुँच योग्य नहीं",
"Not supported on this kind of location": "इस प्रकार के स्थान पर समर्थित नहीं है",
"Trash": "कचरा-पेटी",
@@ -370,8 +371,9 @@
"Modified": "संशोधित",
"modified": "संशोधित",
"Tasks": "कार्य",
- "Download from URL": "URL से डाउनलोड करें",
+ "Import from URL": "URL से आयात करें",
"URL (https://...)": "URL (https://...)",
+ "Upload": "अपलोड करें",
"Upload files": "फ़ाइलें अपलोड करें",
"Upload folders": "फ़ोल्डर अपलोड करें",
"Folder name": "फ़ोल्डर का नाम",
diff --git a/frontend/src/i18n/it.json b/frontend/src/i18n/it.json
index 1e7a4ea0..70924df1 100644
--- a/frontend/src/i18n/it.json
+++ b/frontend/src/i18n/it.json
@@ -200,6 +200,7 @@
"No favorites": "Nessun preferito",
"Add to favorites": "Aggiungi ai preferiti",
"Remove from favorites": "Rimuovi dai preferiti",
+ "Unfavorite": "Rimuovi",
"No longer accessible": "Non più accessibile",
"Not supported on this kind of location": "Non supportato per questo tipo di posizione",
"Trash": "Cestino",
@@ -370,8 +371,9 @@
"Modified": "Modificato",
"modified": "modificato",
"Tasks": "Attività",
- "Download from URL": "Scarica da URL",
+ "Import from URL": "Importa da URL",
"URL (https://...)": "URL (https://...)",
+ "Upload": "Carica",
"Upload files": "Carica file",
"Upload folders": "Carica cartelle",
"Folder name": "Nome della cartella",
diff --git a/frontend/src/i18n/ja.json b/frontend/src/i18n/ja.json
index d40e0482..984658be 100644
--- a/frontend/src/i18n/ja.json
+++ b/frontend/src/i18n/ja.json
@@ -200,6 +200,7 @@
"No favorites": "お気に入りはありません",
"Add to favorites": "お気に入りに追加",
"Remove from favorites": "お気に入りから削除",
+ "Unfavorite": "解除",
"No longer accessible": "アクセスできなくなりました",
"Not supported on this kind of location": "この種類の場所ではサポートされていません",
"Trash": "ゴミ箱",
@@ -370,8 +371,9 @@
"Modified": "変更日時",
"modified": "変更済み",
"Tasks": "タスク",
- "Download from URL": "URL からダウンロード",
+ "Import from URL": "URLからインポート",
"URL (https://...)": "URL (https://...)",
+ "Upload": "アップロード",
"Upload files": "ファイルをアップロード",
"Upload folders": "フォルダーをアップロード",
"Folder name": "フォルダー名",
diff --git a/frontend/src/i18n/ko.json b/frontend/src/i18n/ko.json
index a4cf42ec..92763bf2 100644
--- a/frontend/src/i18n/ko.json
+++ b/frontend/src/i18n/ko.json
@@ -200,6 +200,7 @@
"No favorites": "즐겨찾기 없음",
"Add to favorites": "즐겨찾기에 추가",
"Remove from favorites": "즐겨찾기에서 제거",
+ "Unfavorite": "즐겨찾기 해제",
"No longer accessible": "더 이상 접근할 수 없음",
"Not supported on this kind of location": "이 유형의 위치에서는 지원되지 않습니다",
"Trash": "휴지통",
@@ -370,8 +371,9 @@
"Modified": "수정됨",
"modified": "수정됨",
"Tasks": "작업",
- "Download from URL": "URL에서 다운로드",
+ "Import from URL": "URL에서 가져오기",
"URL (https://...)": "URL (https://...)",
+ "Upload": "업로드",
"Upload files": "파일 업로드",
"Upload folders": "폴더 업로드",
"Folder name": "폴더 이름",
diff --git a/frontend/src/i18n/nl.json b/frontend/src/i18n/nl.json
index b092e6b4..f303bd0a 100644
--- a/frontend/src/i18n/nl.json
+++ b/frontend/src/i18n/nl.json
@@ -200,6 +200,7 @@
"No favorites": "Geen favorieten",
"Add to favorites": "Toevoegen aan favorieten",
"Remove from favorites": "Verwijderen uit favorieten",
+ "Unfavorite": "Verwijderen",
"No longer accessible": "Niet langer toegankelijk",
"Not supported on this kind of location": "Niet ondersteund voor dit type locatie",
"Trash": "Prullenmand",
@@ -370,8 +371,9 @@
"Modified": "Gewijzigd",
"modified": "gewijzigd",
"Tasks": "Taken",
- "Download from URL": "Downloaden van URL",
+ "Import from URL": "Importeren vanaf URL",
"URL (https://...)": "URL (https://...)",
+ "Upload": "Uploaden",
"Upload files": "Bestanden uploaden",
"Upload folders": "Mappen uploaden",
"Folder name": "Mapnaam",
diff --git a/frontend/src/i18n/pl.json b/frontend/src/i18n/pl.json
index 33e3c1d4..7086cf56 100644
--- a/frontend/src/i18n/pl.json
+++ b/frontend/src/i18n/pl.json
@@ -200,6 +200,7 @@
"No favorites": "Brak ulubionych",
"Add to favorites": "Dodaj do ulubionych",
"Remove from favorites": "Usuń z ulubionych",
+ "Unfavorite": "Usuń",
"No longer accessible": "Brak dostępu",
"Not supported on this kind of location": "Nieobsługiwane dla tego typu lokalizacji",
"Trash": "Kosz",
@@ -370,8 +371,9 @@
"Modified": "Zmodyfikowano",
"modified": "zmodyfikowano",
"Tasks": "Zadania",
- "Download from URL": "Pobierz z URL",
+ "Import from URL": "Importuj z adresu URL",
"URL (https://...)": "URL (https://...)",
+ "Upload": "Prześlij",
"Upload files": "Prześlij pliki",
"Upload folders": "Prześlij foldery",
"Folder name": "Nazwa folderu",
diff --git a/frontend/src/i18n/pt-BR.json b/frontend/src/i18n/pt-BR.json
index 75759c1f..f44357e5 100644
--- a/frontend/src/i18n/pt-BR.json
+++ b/frontend/src/i18n/pt-BR.json
@@ -200,6 +200,7 @@
"No favorites": "Nenhum favorito",
"Add to favorites": "Adicionar aos favoritos",
"Remove from favorites": "Remover dos favoritos",
+ "Unfavorite": "Remover",
"No longer accessible": "Não está mais acessível",
"Not supported on this kind of location": "Não há suporte para este tipo de local",
"Trash": "Lixeira",
@@ -370,8 +371,9 @@
"Modified": "Modificado",
"modified": "modificado",
"Tasks": "Tarefas",
- "Download from URL": "Baixar de URL",
+ "Import from URL": "Importar de uma URL",
"URL (https://...)": "URL (https://...)",
+ "Upload": "Enviar",
"Upload files": "Enviar arquivos",
"Upload folders": "Enviar pastas",
"Folder name": "Nome da pasta",
diff --git a/frontend/src/i18n/pt.json b/frontend/src/i18n/pt.json
index f4e42b84..36b33752 100644
--- a/frontend/src/i18n/pt.json
+++ b/frontend/src/i18n/pt.json
@@ -200,6 +200,7 @@
"No favorites": "Nenhum favorito",
"Add to favorites": "Adicionar aos favoritos",
"Remove from favorites": "Remover dos favoritos",
+ "Unfavorite": "Remover",
"No longer accessible": "Já não está acessível",
"Not supported on this kind of location": "Não suportado para este tipo de localização",
"Trash": "Lixeira",
@@ -370,8 +371,9 @@
"Modified": "Modificado",
"modified": "modificado",
"Tasks": "Tarefas",
- "Download from URL": "Baixar de uma URL",
+ "Import from URL": "Importar de uma URL",
"URL (https://...)": "URL (https://...)",
+ "Upload": "Enviar",
"Upload files": "Enviar arquivos",
"Upload folders": "Enviar pastas",
"Folder name": "Nome da pasta",
diff --git a/frontend/src/i18n/ru.json b/frontend/src/i18n/ru.json
index a60624cf..2771ca9d 100644
--- a/frontend/src/i18n/ru.json
+++ b/frontend/src/i18n/ru.json
@@ -200,6 +200,7 @@
"No favorites": "Нет избранного",
"Add to favorites": "Добавить в избранное",
"Remove from favorites": "Удалить из избранного",
+ "Unfavorite": "Удалить",
"No longer accessible": "Больше недоступно",
"Not supported on this kind of location": "Не поддерживается для этого типа расположения",
"Trash": "Корзина",
@@ -370,8 +371,9 @@
"Modified": "Изменено",
"modified": "изменено",
"Tasks": "Задачи",
- "Download from URL": "Скачать по URL",
+ "Import from URL": "Импортировать по URL",
"URL (https://...)": "URL (https://...)",
+ "Upload": "Загрузить",
"Upload files": "Загрузить файлы",
"Upload folders": "Загрузить папки",
"Folder name": "Имя папки",
diff --git a/frontend/src/i18n/tr.json b/frontend/src/i18n/tr.json
index c555fbbd..89f2dfe3 100644
--- a/frontend/src/i18n/tr.json
+++ b/frontend/src/i18n/tr.json
@@ -200,6 +200,7 @@
"No favorites": "Favori yok",
"Add to favorites": "Favorilere ekle",
"Remove from favorites": "Favorilerden kaldır",
+ "Unfavorite": "Kaldır",
"No longer accessible": "Artık erişilemiyor",
"Not supported on this kind of location": "Bu tür bir konumda desteklenmiyor",
"Trash": "Çöp kutusu",
@@ -370,8 +371,9 @@
"Modified": "Değiştirildi",
"modified": "değiştirildi",
"Tasks": "Görevler",
- "Download from URL": "URL'den indir",
+ "Import from URL": "URL'den içe aktar",
"URL (https://...)": "URL (https://...)",
+ "Upload": "Yükle",
"Upload files": "Dosya yükle",
"Upload folders": "Klasör yükle",
"Folder name": "Klasör adı",
diff --git a/frontend/src/i18n/zh.json b/frontend/src/i18n/zh.json
index e254e7f1..3e1b54b3 100644
--- a/frontend/src/i18n/zh.json
+++ b/frontend/src/i18n/zh.json
@@ -200,6 +200,7 @@
"No favorites": "暂无收藏",
"Add to favorites": "添加到收藏",
"Remove from favorites": "从收藏中移除",
+ "Unfavorite": "取消收藏",
"No longer accessible": "无法再访问",
"Not supported on this kind of location": "不支持此类位置",
"Trash": "回收站",
@@ -370,8 +371,9 @@
"Modified": "修改时间",
"modified": "已修改",
"Tasks": "任务",
- "Download from URL": "从 URL 下载",
+ "Import from URL": "从 URL 导入",
"URL (https://...)": "URL (https://...)",
+ "Upload": "上传",
"Upload files": "上传文件",
"Upload folders": "上传文件夹",
"Folder name": "文件夹名称",
diff --git a/frontend/src/styles/components/_app.scss b/frontend/src/styles/components/_app.scss
index 6b3fd7a5..83fc9d6c 100755
--- a/frontend/src/styles/components/_app.scss
+++ b/frontend/src/styles/components/_app.scss
@@ -249,44 +249,114 @@
display: flex;
justify-content: flex-start;
align-items: center;
- align-content: center;
- flex: 1 1 auto !important;
- padding: .5rem;
+ flex: 1 1 auto;
+ padding: $btn-padding-x;
border-top: .5px solid;
border-bottom: .5px solid;
height: $sidebar-apps-icons-height;
+}
+
+.app-top-menu-tool-bar {
+ --app-top-menu-action-active-bg: rgba(var(--bs-primary-rgb), #{$app-top-menu-action-active-bg-opacity});
+ --app-top-menu-action-highlighted-bg: rgba(var(--bs-primary-rgb), #{$app-top-menu-action-highlighted-bg-opacity});
+
+ gap: .3rem;
+ padding: 0 .55rem;
- .btn.me-1, .btn-group.me-1 {
- // handles space between button
- margin-right: .4rem !important;
+ > .btn-custom {
+ margin-right: 0;
+ }
+
+ .btn-group {
+ flex: 0 0 auto;
}
.btn {
- min-height: 31px;
- min-width: 35px;
+ display: inline-flex !important;
+ align-items: center;
+ justify-content: center;
+ gap: .25rem;
+ min-width: $app-top-menu-action-min-width;
+ min-height: $app-top-menu-action-min-height;
+ padding: $btn-padding-y ($btn-padding-x + $dropdown-spacer);
+ border-radius: $border-radius-lg;
+ white-space: nowrap;
> .lucide {
+ flex: 0 0 auto;
+ margin: 0;
font-size: $font-size-xl;
}
- span {
+ > span {
display: inline-flex;
align-items: center;
- font-size: $font-size-xs;
+ font-size: .8rem;
+ font-weight: $app-top-menu-label-font-weight;
+ line-height: 1;
+ }
+ }
- .lucide {
- font-size: $font-size-2xl;
- margin-right: 0.2rem;
- }
+ :is(.btn-default, .btn-custom):not(.input-group-text) {
+ border-color: transparent !important;
+ background-color: transparent !important;
+
+ &:hover:not(:disabled),
+ &:focus-visible:not(:disabled) {
+ border-color: transparent !important;
+ }
+
+ &:is(.active, :active, [aria-pressed='true']):not(:disabled) {
+ border-color: transparent !important;
+ background-color: var(--app-top-menu-action-active-bg) !important;
+ }
+
+ &:disabled {
+ border-color: transparent !important;
+ background-color: transparent !important;
+ opacity: $btn-disabled-opacity;
+ }
+ }
+
+ .app-top-menu-tool-bar__action--highlighted.btn-default {
+ background-color: var(--app-top-menu-action-highlighted-bg) !important;
+
+ &:disabled {
+ background-color: var(--app-top-menu-action-highlighted-bg) !important;
+ }
+ }
+
+ .app-top-menu-tool-bar__action--icon {
+ width: $app-top-menu-action-min-width;
+ padding-inline: 0;
+
+ &.dropdown-toggle::after {
+ display: none;
}
}
+ .app-top-menu-tool-bar__utilities {
+ flex: 0 0 auto;
+ padding-left: $btn-padding-x + $dropdown-spacer;
+ }
+
+ .dropdown-toggle:not(.app-top-menu-tool-bar__action--icon)::after {
+ margin-left: $dropdown-padding-y;
+ opacity: $app-top-menu-dropdown-indicator-opacity;
+ }
+
.dropdown-menu {
- margin: 1px;
+ margin: $dropdown-spacer;
+ padding: $dropdown-padding-y;
+ border-radius: $border-radius-lg;
.dropdown-item {
+ padding: $dropdown-item-padding-y $dropdown-item-padding-x;
+ border-radius: $border-radius-base;
+ font-weight: 450;
+
&.disabled {
- opacity: 0.4;
+ opacity: $btn-disabled-opacity;
}
span {
@@ -294,11 +364,41 @@
align-items: center;
.lucide {
- margin-right: 0.4rem;
+ margin-right: $dropdown-item-padding-x;
font-size: $font-size-md;
}
}
}
+
+ .dropdown-divider {
+ margin: $dropdown-divider-margin-y 0;
+ }
+ }
+}
+
+@include media-breakpoint-down(sm) {
+ .app-top-menu-tool-bar {
+ height: auto;
+ min-height: $sidebar-apps-icons-height;
+ flex-wrap: wrap !important;
+ padding-inline: $dropdown-padding-y;
+
+ .btn-group.d-none {
+ display: inline-flex !important;
+ }
+
+ .btn > .app-top-menu-tool-bar__label {
+ display: none;
+ }
+
+ .app-top-menu-tool-bar__action--quiet {
+ width: $app-top-menu-action-min-width;
+ padding-inline: 0;
+ }
+
+ .app-top-menu-tool-bar__utilities {
+ padding-left: $btn-padding-y;
+ }
}
}
diff --git a/frontend/src/styles/components/_badges.scss b/frontend/src/styles/components/_badges.scss
index a159ec39..0e719ff7 100644
--- a/frontend/src/styles/components/_badges.scss
+++ b/frontend/src/styles/components/_badges.scss
@@ -105,7 +105,6 @@ body.theme-dark .badge {
--badge-fg: #e2e8f0;
--badge-bg-full: #475569;
--badge-border-full: #64748b;
- //box-shadow: inset 0 0 0 9999px rgba($sidebar-dark-apps-menu-bg, 0.8);
}
$badge-variants: (
diff --git a/frontend/src/styles/components/_boxes.scss b/frontend/src/styles/components/_boxes.scss
deleted file mode 100644
index b659e15a..00000000
--- a/frontend/src/styles/components/_boxes.scss
+++ /dev/null
@@ -1,137 +0,0 @@
-.box-transparent {
- position: relative;
- width: 100%;
- border: 1px solid;
- border-radius: $box-border-radius;
- overflow: hidden;
- transition: box-shadow .2s ease;
-
- .box-header {
- border-bottom: 1px solid;
- height: auto;
- padding: 0.3rem 0.8rem;
-
- > .lucide {
- font-size: $font-size-base;
-
- &:first-child {
- margin-right: 10px;
- }
- }
-
- .box-title {
- font-weight: 500;
- }
- }
-
- .box-body {
- padding: 0.2rem 0.4rem 0.4rem;
- }
-}
-
-.box-header {
- display: flex;
- align-items: center;
- padding: $box-padding;
-
- .box-title {
- @include no-select-utility;
- display: inline-block;
- font-size: $font-size-xs;
- margin: 0;
- line-height: 1;
- }
-
- > .lucide {
- color: $gray;
- font-size: $font-size-base;
- }
-}
-
-//Box Body
-.box-body {
- border-radius: 0 0 $box-border-radius, $box-border-radius;
- padding: $box-padding;
-
- > .table {
- margin-bottom: 0;
- }
-}
-
-.box-header,
-.box-body {
- @include clearfix;
-}
-
-.small-box {
- @include border-radius($border-radius);
- position: relative;
- display: flex;
- margin-bottom: 10px;
- min-height: 45px;
- cursor: pointer;
- border: .5px solid darken($body-bg, 5%);
- // content wrapper
- > .inner {
- display: flex;
- align-items: center;
- padding-left: 10px;
- }
-
- h4 {
- font-weight: 600;
- margin: 0;
- white-space: nowrap;
- padding: 0;
-
- }
-
- p {
- font-size: $font-size-xs;
- margin: 0;
-
- > small {
- display: block;
- color: #f9f9f9;
- font-size: $font-size-xs;
- margin-top: 5px;
- }
- }
-
- h4, p {
- z-index: 5;
- }
-
- .icon {
- transition: all $transition-speed linear;
- align-self: center;
- margin-left: auto;
- padding-right: 10px;
- z-index: 0;
- font-size: $font-size-2xl;
- color: rgba(0, 0, 0, 0.15);
- }
-
- &:hover {
- background-color: $table-bg-hover;
- text-decoration: none;
- // Animate icons on small box hover
- .icon {
- font-size: 28px;
- }
- }
-}
-
-@include media-breakpoint-down(lg) {
- // No need for icons on very small devices
- .small-box {
- .icon {
- margin-right: auto;
- padding-right: 0;
- }
-
- .inner {
- display: none;
- }
- }
-}
diff --git a/frontend/src/styles/components/_contextmenu.scss b/frontend/src/styles/components/_contextmenu.scss
index 6770c1c1..f8962f69 100644
--- a/frontend/src/styles/components/_contextmenu.scss
+++ b/frontend/src/styles/components/_contextmenu.scss
@@ -14,12 +14,14 @@
font-size: $dropdown-font-size !important;
border-width: .5px !important;
border-style: solid !important;
+ font-weight: 450;
> button.ngx-context-menu-item {
padding: $dropdown-item-padding-y $dropdown-item-padding-x !important;
align-items: center !important;
@include app-menu-item-structure($btn-border-radius, 0, true);
+
> span {
display: flex;
align-items: center;
diff --git a/frontend/src/styles/components/_core.scss b/frontend/src/styles/components/_core.scss
index 4b6b6286..3559aaf9 100644
--- a/frontend/src/styles/components/_core.scss
+++ b/frontend/src/styles/components/_core.scss
@@ -23,7 +23,6 @@ html {
body {
margin: 0;
height: 100%;
- //letter-spacing: -0.01em;
font-optical-sizing: auto;
font-kerning: normal;
font-feature-settings: "kern" 1, "liga" 1;
diff --git a/frontend/src/styles/components/_header.scss b/frontend/src/styles/components/_header.scss
index a5f002f6..670a9ed5 100644
--- a/frontend/src/styles/components/_header.scss
+++ b/frontend/src/styles/components/_header.scss
@@ -18,7 +18,7 @@
border: none;
@include border-radius(0);
padding: 0;
- background-color: $primary;
+ background-color: $app-header-bg;
}
.navbar-content {
@@ -34,7 +34,7 @@
}
.navbar-logo-button {
- padding: 0 .4rem;
+ padding: 0 .5rem;
flex-shrink: 0;
&:hover,
@@ -87,7 +87,7 @@
.navbar-breadcrumb {
margin-left: -.5px;
- border-left: .5px solid mix($sidebar-light-icons-menu-hover-bg, $primary, 50%);
+ border-left: .5px solid $app-header-border-color;
flex: 1 1 auto;
min-width: 0;
overflow: hidden;
@@ -98,7 +98,7 @@
display: block;
flex: 0 1 250px;
min-width: 190px;
- padding: 0 .5rem;
+ padding: 0 .55rem;
}
&.navbar-content--search app-navbar-search {
@@ -106,7 +106,7 @@
min-width: 280px;
margin-left: -.5px;
margin-right: auto;
- border-left: .5px solid mix($sidebar-light-icons-menu-hover-bg, $primary, 50%);
+ border-left: .5px solid $app-header-border-color;
}
.navbar-search {
@@ -133,20 +133,35 @@
}
.navbar-search-panel {
+ --navbar-search-border-color: #{$app-header-border-color};
+
display: flex;
align-items: center;
width: 100%;
min-width: 0;
height: 32px;
- border: 1px solid mix($sidebar-light-icons-menu-hover-bg, $primary, 50%);
+ border: 1px solid var(--navbar-search-border-color);
border-radius: $border-radius-base;
background: rgba($black, .12);
transition: border-color .15s ease;
}
.navbar-search-mode {
+ position: relative;
flex: 0 0 auto;
height: 100%;
+
+ &::after {
+ content: '';
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ z-index: 1;
+ width: 1px;
+ background-color: var(--navbar-search-border-color);
+ pointer-events: none;
+ }
}
.navbar-search-mode-toggle {
@@ -158,7 +173,6 @@
height: 100%;
padding: 0 .25rem;
border: 0;
- border-right: 1px solid mix($sidebar-light-icons-menu-hover-bg, $primary, 50%);
background: transparent;
color: $white;
@@ -295,7 +309,7 @@
.navbar-search-submit {
right: 0;
- border-left: 1px solid mix($sidebar-light-icons-menu-hover-bg, $primary, 50%);
+ border-left: 1px solid var(--navbar-search-border-color);
&:disabled {
opacity: .4;
@@ -371,7 +385,6 @@
width: 100%;
height: 32px;
margin: 0;
- border-color: mix($sidebar-light-icons-menu-hover-bg, $primary, 50%);
background: rgba($black, .12);
box-shadow: none;
}
@@ -395,8 +408,7 @@
width: auto;
height: 42px;
margin: .4rem;
- border-color: mix($sidebar-light-icons-menu-hover-bg, $primary, 50%);
- background: $primary;
+ background: $app-header-bg;
box-shadow: 0 .35rem 1rem rgba($black, .28);
}
@@ -406,7 +418,7 @@
}
.navbar-search-panel:focus-within {
- border-color: mix($sidebar-light-icons-menu-hover-bg, $primary, 75%);
+ --navbar-search-border-color: #{$app-header-border-focus-color};
}
}
@@ -457,8 +469,8 @@
min-width: 0;
height: $navbar-height;
background: transparent;
- font-size: .8rem;
- padding: 0 .5rem 0 .875rem;
+ font-size: $font-size-base;
+ padding: 0 .5rem;
margin: 0;
color: $sidebar-light-icons-menu-color;
diff --git a/frontend/src/styles/components/_profile.scss b/frontend/src/styles/components/_profile.scss
index 54ed2550..f55c924e 100644
--- a/frontend/src/styles/components/_profile.scss
+++ b/frontend/src/styles/components/_profile.scss
@@ -3,6 +3,10 @@
padding: 0.5rem;
}
+app-user-profile .sidebar-component-title.app-top-menu-tool-bar .btn > .lucide {
+ font-size: 1.0625rem;
+}
+
.user-groups-page {
display: flex;
flex-direction: column;
diff --git a/frontend/src/styles/components/_recents.scss b/frontend/src/styles/components/_recents.scss
index b209963e..22a133d2 100644
--- a/frontend/src/styles/components/_recents.scss
+++ b/frontend/src/styles/components/_recents.scss
@@ -8,26 +8,9 @@
$border-hover,
$text,
$muted,
- $primary-soft,
$card-shadow,
$card-hover-shadow
) {
- .view-switch {
- border-color: $border;
- background: $surface-muted;
- }
-
- .view-switch__option {
- color: $muted;
-
- &:hover,
- &:focus-visible,
- &.active {
- color: $text;
- background: $primary-soft;
- }
- }
-
app-recents {
.recents-day__date,
.recents-day__range,
@@ -311,37 +294,6 @@ app-recents {
}
}
-.view-switch {
- width: fit-content;
- height: 1.9rem;
- margin: 0 0 0 auto;
- padding: 0.15rem;
- display: flex;
- align-items: center;
- gap: 0.3rem;
- border: 1px solid;
- border-radius: $border-radius;
-}
-
-.view-switch__option {
- min-width: 4.2rem;
- height: 1.5rem;
- padding: 0 0.68rem;
- border: 0;
- border-radius: $border-radius - 0.1rem;
- background: transparent;
- font-size: $font-size-xs;
- font-weight: 500;
- line-height: 1;
- cursor: pointer;
- transition: color 0.15s ease, background-color 0.15s ease;
-
- &:focus-visible {
- outline: 2px solid rgba($primary, 0.4);
- outline-offset: 1px;
- }
-}
-
@keyframes recent-card-enter {
from {
opacity: 0;
diff --git a/frontend/src/styles/components/_sidebar_left.scss b/frontend/src/styles/components/_sidebar_left.scss
index 5b020fcd..766c6f07 100755
--- a/frontend/src/styles/components/_sidebar_left.scss
+++ b/frontend/src/styles/components/_sidebar_left.scss
@@ -19,8 +19,8 @@
height: $navbar-height;
min-width: $sidebar-apps-menus-width;
font-size: $font-size-xs;
- background: $sidebar-light-apps-menu-title-bg;
- border-bottom: .5px solid $sidebar-light-apps-menu-title-bg;
+ background: $app-header-bg;
+ border-bottom: .5px solid $app-header-bg;
.menu-title-content {
@include text-truncate-utility;
@@ -192,7 +192,6 @@
flex: 1 1 auto;
min-height: 0;
overflow: hidden;
- font-size: 0.8rem;
.menus-top {
flex: 0 1 auto;
diff --git a/frontend/src/styles/components/_sidebar_left_collapse.scss b/frontend/src/styles/components/_sidebar_left_collapse.scss
index c90d5519..34742d76 100755
--- a/frontend/src/styles/components/_sidebar_left_collapse.scss
+++ b/frontend/src/styles/components/_sidebar_left_collapse.scss
@@ -3,14 +3,6 @@
margin-left: 0 !important;
}
- .breadcrumb {
- padding-left: .5rem;
- }
-
- .app-top-menu {
- padding-left: .3rem;
- }
-
&.theme-dark {
.content-container {
border-left: .5px solid $sidebar-dark-icons-menu-border-color !important;
diff --git a/frontend/src/styles/components/_sidebar_right.scss b/frontend/src/styles/components/_sidebar_right.scss
index 89c86885..a01fee65 100755
--- a/frontend/src/styles/components/_sidebar_right.scss
+++ b/frontend/src/styles/components/_sidebar_right.scss
@@ -31,6 +31,15 @@
}
.sidebar-component-title {
+ &.app-top-menu-tool-bar {
+ .btn {
+ min-width: auto;
+ min-height: calc(#{$btn-line-height * 1em} + var(--bs-btn-padding-y) + var(--bs-btn-padding-y) + var(--bs-btn-border-width) + var(--bs-btn-border-width));
+ padding: var(--bs-btn-padding-y) var(--bs-btn-padding-x);
+ border-radius: var(--bs-btn-border-radius);
+ }
+ }
+
.lucide {
font-size: $font-size-xl;
}
diff --git a/frontend/src/styles/components/_texts.scss b/frontend/src/styles/components/_texts.scss
index e3e4c6e0..883c3f06 100644
--- a/frontend/src/styles/components/_texts.scss
+++ b/frontend/src/styles/components/_texts.scss
@@ -1,6 +1,5 @@
:root {
--font-size-3xl: #{$font-size-3xl};
- --font-size-2xl: #{$font-size-2xl};
--font-size-xl: #{$font-size-xl};
--font-size-lg: #{$font-size-lg};
--font-size-md: #{$font-size-md};
diff --git a/frontend/src/styles/components/_theme_dark.scss b/frontend/src/styles/components/_theme_dark.scss
index e38c77e8..64b7e553 100755
--- a/frontend/src/styles/components/_theme_dark.scss
+++ b/frontend/src/styles/components/_theme_dark.scss
@@ -45,7 +45,7 @@
&:hover, &.active {
> a {
background: $sidebar-dark-apps-menu-hover-bg;
- color: $sidebar-dark-apps-menu-hover-color;
+ color: var(--app-menu-item-color);
> .lucide:first-child {
color: $primary;
@@ -121,6 +121,13 @@
}
@mixin skin-dark-app() {
+ --app-action-state-bg: #{$dark-action-state-bg};
+ --app-action-state-color: #{$gray-lightest};
+ --app-menu-item-color: #{$gray-lighter};
+ --app-primary-action-bg: rgba(var(--bs-primary-rgb), 0.48);
+ --app-menu-surface-bg: #{$dark-menu-bg};
+ --app-menu-surface-border: #{$dark-menu-surface-border};
+
.dialog-tab-card {
box-shadow: 0 12px 24px $dark-dialog-tab-card-shadow-color;
}
@@ -181,12 +188,12 @@
.btn-custom,
.btn-outline-secondary-alt {
border-color: $dark-surface-border !important;
- color: $dark-item-color !important;
+ color: $theme-muted-blue !important;
background-color: $dark-surface-bg !important;
&:hover:not(:disabled) {
border-color: mix($primary, $sidebar-dark-icons-menu-border-color, 34%) !important;
- color: $dark-item-hover-color !important;
+ color: $dark-control-state-color !important;
background-color: $sidebar-dark-icons-menu-bg !important;
}
@@ -213,6 +220,20 @@
border-color: $primary !important;
color: $white !important;
}
+ app-files-files-new-dialog .btn-default[aria-pressed] {
+ &:hover:not(:disabled),
+ &:focus-visible:not(:disabled) {
+ color: var(--app-action-state-color) !important;
+ border-color: var(--app-action-state-bg) !important;
+ background-color: var(--app-action-state-bg) !important;
+ }
+
+ &:is(.active, :active, [aria-pressed='true']):not(:disabled) {
+ color: var(--app-action-state-color) !important;
+ border-color: var(--app-action-state-bg) !important;
+ background-color: var(--app-action-state-bg) !important;
+ }
+ }
app-input-filter {
.filter-shell {
border-color: $dark-surface-border;
@@ -260,34 +281,36 @@
}
}
.dropdown-menu {
- border: .5px solid $dark-surface-border !important;
- background-color: $dark-surface-bg !important;
+ border: .5px solid var(--app-menu-surface-border) !important;
+ background-color: var(--app-menu-surface-bg) !important;
box-shadow: $dark-menu-surface-shadow;
> li > a {
- color: $dark-item-color;
+ color: var(--app-menu-item-color);
background-color: transparent;
&:hover {
- background-color: $sidebar-dark-icons-menu-hover-bg !important;
+ color: var(--app-action-state-color);
+ background-color: var(--app-action-state-bg) !important;
}
}
> .divider {
- background-color: $theme-dropdown-divider-bg;
+ background-color: var(--app-menu-surface-border);
}
}
.dropdown-item {
- color: $dark-item-color;
+ color: var(--app-menu-item-color);
&:hover,
&.active,
&:active {
- background-color: $sidebar-dark-icons-menu-bg !important;
+ color: var(--app-action-state-color);
+ background-color: var(--app-action-state-bg) !important;
}
}
.dropdown-divider {
- border-top-color: $dark-surface-border !important;
+ border-top-color: var(--app-menu-surface-border) !important;
}
.virtual-scroll-border-top {
@@ -325,18 +348,38 @@
.app-top-menu {
border-top-color: $sidebar-dark-icons-menu-border-color;
border-bottom-color: $sidebar-dark-icons-menu-border-color;
- background-color: darken($sidebar-dark-icons-menu-bg, 1.5%);
+ background-color: $dark-menu-bg;
+ }
- .dropdown-menu {
- > li > a {
- color: $gray-light;
- }
+ :is(.app-top-menu, .sidebar-component-title).app-top-menu-tool-bar {
+ --app-top-menu-action-active-bg: var(--app-action-state-bg);
+ --app-top-menu-action-highlighted-bg: #{$dark-highlighted-action-bg};
+ --app-top-menu-action-hover-bg: var(--app-action-state-bg);
+
+ :is(.btn-default, .btn-custom):not(:disabled) {
+ color: var(--app-menu-item-color) !important;
}
- .dropdown-item {
- color: $gray-light;
+ :is(.btn-default, .btn-custom):focus-visible:not(:disabled) {
+ background-color: var(--app-top-menu-action-hover-bg) !important;
+ color: var(--app-menu-item-color) !important;
+ }
+
+ :is(.btn-default, .btn-custom):is(.active, :active, [aria-pressed='true']):not(:disabled) {
+ background-color: var(--app-top-menu-action-active-bg) !important;
+ color: var(--app-action-state-color) !important;
+ }
+
+ :is(.btn-default, .btn-custom):hover:not(:disabled) {
+ background-color: var(--app-top-menu-action-hover-bg) !important;
+ color: var(--app-action-state-color) !important;
+ }
+
+ .btn-default.input-group-text:hover:not(:disabled) {
+ border-color: $dark-surface-border !important;
}
}
+
.app-foot-menu {
border-top: 0.5px solid $dark-border-subtle !important;
background-color: $sidebar-dark-icons-menu-bg;
@@ -440,8 +483,6 @@
#{mix($sidebar-dark-apps-menu-title-bg, $dark-dialog-tab-bg, 62%)} 100%
);
--sync-client-subtle-color: #{$dark-item-color};
- --sync-client-paths-count-fg: #{$white};
- --sync-client-paths-count-bg: #{lighten($primary, 6%)};
--sync-client-path-empty-border: #{$dark-dialog-check-card-hover-border-color};
--sync-client-path-empty-bg: #{mix($dark-dialog-tab-bg, $sidebar-dark-apps-menu-title-bg, 70%)};
--sync-path-actions-separator: #{$dark-dialog-check-card-border-color};
@@ -505,27 +546,29 @@
background-color: lighten($sidebar-dark-apps-menu-bg, 4%);
color: $gray-light;
}
- //.content-container {
- // border-left: .5px solid $sidebar-dark-icons-menu-border-color;
- //}
.ngx-contextmenu {
- background-color: $dark-surface-bg !important;
- border-color: $dark-surface-border !important;
+ background-color: var(--app-menu-surface-bg) !important;
+ border-color: var(--app-menu-surface-border) !important;
box-shadow: $dark-menu-surface-shadow !important;
> button.ngx-context-menu-item {
- color: $gray-light !important;
+ color: var(--app-menu-item-color) !important;
background-color: transparent !important;
- &:hover,
- &:focus-visible,
- &.active {
- background-color: $sidebar-dark-icons-menu-hover-bg !important;
+ &:focus-visible {
+ color: var(--app-menu-item-color) !important;
+ background-color: var(--app-action-state-bg) !important;
+ }
+
+ &.active,
+ &:hover {
+ color: var(--app-action-state-color) !important;
+ background-color: var(--app-action-state-bg) !important;
}
}
> [role='separator'] {
- border-top-color: $dark-surface-border !important;
+ border-top-color: var(--app-menu-surface-border) !important;
}
}
.dialog-tab-card,
@@ -689,6 +732,13 @@
color: $gray-light !important;
background-color: lighten($sidebar-dark-apps-menu-title-bg, 8%) !important;
}
+ @include view-switch-theme(
+ $surface: $dark-bg-theme,
+ $border: $dark-surface-border,
+ $text: $dark-control-state-color,
+ $muted: $dark-text-muted-color,
+ $state-background: var(--app-primary-action-bg)
+ );
@include recents-theme(
$surface: $dark-surface-bg,
$surface-muted: $dark-bg-theme,
@@ -699,7 +749,6 @@
$border-hover: $dark-dialog-check-card-hover-border-color,
$text: $dark-item-hover-color,
$muted: $dark-text-muted-color,
- $primary-soft: rgba($primary, 0.26),
$card-shadow: $dark-dialog-tab-card-shadow-color,
$card-hover-shadow: $dark-dialog-check-card-hover-shadow-color
);
diff --git a/frontend/src/styles/components/_theme_light.scss b/frontend/src/styles/components/_theme_light.scss
index e59ae1b2..6a5fc51f 100755
--- a/frontend/src/styles/components/_theme_light.scss
+++ b/frontend/src/styles/components/_theme_light.scss
@@ -128,6 +128,11 @@
}
@mixin skin-light-app() {
+ --app-action-state-bg: #{$light-menu-item-hover-bg};
+ --app-action-state-color: #{$light-item-hover-color};
+ --app-menu-item-color: #{$light-item-color};
+ --app-menu-surface-bg: #{$light-overlay-menu-bg};
+
.dialog-tab-card {
background: $light-dialog-tab-card-bg;
border: 1px solid $light-dialog-tab-card-border-color;
@@ -238,6 +243,14 @@
border-color: $primary !important;
color: $white !important;
}
+ app-files-files-new-dialog .btn-default[aria-pressed] {
+ &:hover:not(:disabled),
+ &:focus-visible:not(:disabled),
+ &:is(.active, :active, [aria-pressed='true']):not(:disabled) {
+ color: var(--app-action-state-color) !important;
+ background-color: var(--app-action-state-bg) !important;
+ }
+ }
app-input-filter {
.filter-shell {
border-color: $light-surface-border;
@@ -282,16 +295,16 @@
}
.dropdown-menu {
border: .5px solid $light-menu-surface-border !important;
- background-color: $gray-lightest !important;
+ background-color: var(--app-menu-surface-bg) !important;
box-shadow: $light-menu-surface-shadow;
> li > a {
- color: $light-item-color;
+ color: var(--app-menu-item-color);
background-color: transparent;
&:hover {
- background-color: $light-menu-item-hover-bg !important;
- color: $light-item-hover-color !important;
+ background-color: var(--app-action-state-bg) !important;
+ color: var(--app-action-state-color) !important;
}
}
@@ -300,13 +313,13 @@
}
}
.dropdown-item {
- color: $light-item-color;
+ color: var(--app-menu-item-color);
&:hover,
&.active,
&:active {
- background-color: $light-menu-item-hover-bg !important;
- color: $light-item-hover-color !important;
+ background-color: var(--app-action-state-bg) !important;
+ color: var(--app-action-state-color) !important;
}
}
.dropdown-divider {
@@ -322,10 +335,6 @@
border-top: 1px solid $gray-light;
}
- //thead {
- // background-color: $light-table-head-bg;
- //}
-
tbody tr {
border-bottom-color: $gray-lighter !important;
@@ -346,10 +355,22 @@
.app-top-menu {
border-top-color: $gray-light;
border-bottom-color: $gray-light;
- background: linear-gradient(to right, $light-app-top-menu-gradient-start 0%, $light-app-top-menu-gradient-mid 50%, $light-app-top-menu-gradient-end 100%);
+ background: linear-gradient(
+ to right,
+ $light-app-top-menu-gradient-start 0%,
+ $light-app-top-menu-gradient-mid 50%,
+ $light-app-top-menu-gradient-end 100%
+ );
+ }
- .dropdown-menu {
- background-color: $gray-lightest !important;
+ :is(.app-top-menu, .sidebar-component-title).app-top-menu-tool-bar {
+ --app-top-menu-action-highlighted-bg: #{$light-sidebar-mini-active-bg};
+ --app-top-menu-action-hover-bg: var(--app-action-state-bg);
+
+ :is(.btn-default, .btn-custom):hover:not(:disabled),
+ :is(.btn-default, .btn-custom):focus-visible:not(:disabled) {
+ background-color: var(--app-top-menu-action-hover-bg) !important;
+ color: var(--app-action-state-color) !important;
}
}
.app-foot-menu {
@@ -390,8 +411,6 @@
#{mix($light-dialog-tab-card-bg, $theme-light-panel-bg, 68%)} 100%
);
--sync-client-subtle-color: #{$light-text-muted-color};
- --sync-client-paths-count-fg: #{$white};
- --sync-client-paths-count-bg: #{$primary};
--sync-client-path-empty-border: #{$light-dialog-check-card-hover-border-color};
--sync-client-path-empty-bg: #{mix($light-dialog-check-card-hover-bg, $white, 72%)};
--sync-path-actions-separator: #{$light-dialog-check-card-border-color};
@@ -527,23 +546,20 @@
background-color: $white;
color: $body-color;
}
- //.content-container {
- // border-left: .5px solid $sidebar-light-apps-menu-border-color;
- //}
.ngx-contextmenu {
- background-color: $gray-lightest !important;
+ background-color: var(--app-menu-surface-bg) !important;
border-color: $light-menu-surface-border !important;
box-shadow: $light-menu-surface-shadow !important;
> button.ngx-context-menu-item {
- color: $light-item-color !important;
+ color: var(--app-menu-item-color) !important;
background-color: transparent !important;
&:hover,
&:focus-visible,
&.active {
- background-color: $light-menu-item-hover-bg !important;
- color: $light-item-hover-color !important;
+ background-color: var(--app-action-state-bg) !important;
+ color: var(--app-action-state-color) !important;
}
}
@@ -591,7 +607,6 @@
}
.small-box {
- //background: $gray-lightest;
border-color: $gray-lighter;
}
.nav-link {
@@ -635,6 +650,13 @@
.text-bg-light {
background-color: $white !important;
}
+ @include view-switch-theme(
+ $surface: $light-surface-bg,
+ $border: $light-surface-border,
+ $text: $light-item-color,
+ $muted: $light-text-muted-color,
+ $state-background: $light-sidebar-mini-active-bg
+ );
@include recents-theme(
$surface: $white,
$surface-muted: $light-surface-bg,
@@ -645,7 +667,6 @@
$border-hover: $light-dialog-check-card-hover-border-color,
$text: $light-item-color,
$muted: $light-text-muted-color,
- $primary-soft: rgba($primary, 0.12),
$card-shadow: $light-dialog-tab-card-shadow-color,
$card-hover-shadow: $light-dialog-check-card-hover-shadow-color
);
diff --git a/frontend/src/styles/components/_themes.scss b/frontend/src/styles/components/_themes.scss
index 83c8c12d..de7614b7 100755
--- a/frontend/src/styles/components/_themes.scss
+++ b/frontend/src/styles/components/_themes.scss
@@ -1,8 +1,4 @@
body {
- .navbar {
- background-color: $primary;
- }
-
&.theme-light {
@include skin-light-app();
@include skin-light-left-sidebar();
diff --git a/frontend/src/styles/components/_variables.scss b/frontend/src/styles/components/_variables.scss
index 6d8be286..b9752d55 100644
--- a/frontend/src/styles/components/_variables.scss
+++ b/frontend/src/styles/components/_variables.scss
@@ -11,6 +11,15 @@ $layout-logo-container-size: 32px;
$layout-logo-image-size: 24px;
$sidebar-z-index: 1030;
$content-z-index: 1000;
+
+// Top menu toolbar
+$app-top-menu-action-min-width: 2.1875rem;
+$app-top-menu-action-min-height: 1.9375rem;
+$app-top-menu-label-font-weight: 450;
+$app-top-menu-action-active-bg-opacity: .16;
+$app-top-menu-action-highlighted-bg-opacity: .12;
+$app-top-menu-dropdown-indicator-opacity: .65;
+
// Sidebar right (control)
//--------------------------------------------------------
$control-sidebar-width: 310px;
@@ -41,10 +50,8 @@ $sidebar-dark-apps-menu-hover-color: #fff;
$sidebar-dark-apps-menu-border-color: #8ea8b4;
//Light sidebar
$sidebar-light-icons-menu-bg: $primary;
-//$sidebar-light-icons-menu-hover-bg: #2a445e;
$sidebar-light-icons-menu-hover-bg: darken($sidebar-light-icons-menu-bg, 15%);
$sidebar-light-icons-menu-color: $gray-lightest;
-$sidebar-light-apps-menu-title-bg: $sidebar-light-icons-menu-bg;
$sidebar-light-apps-menu-title-color: $theme-muted-blue;
$sidebar-light-apps-menu-bg: mix($gray-lightest, $gray-lighter, 60%);
$sidebar-light-apps-menu-color: $custom-dark-color;
@@ -55,19 +62,26 @@ $sidebar-light-apps-menu-border-color: $gray-mid;
//--------------------------------------------------------
//Shared theme tokens
$theme-btn-bg-hover-overlay-shadow: rgba(0, 0, 0, 0.2);
-$theme-dropdown-divider-bg: #eee;
$theme-dialog-tab-active-bg: $primary;
$theme-dialog-tab-active-border-color: darken($primary, 7%);
$theme-dialog-tab-count-color: inherit;
+$app-header-bg: mix($primary, $sidebar-dark-icons-menu-bg, 85%);
+$app-header-border-color: mix($sidebar-light-icons-menu-hover-bg, $primary, 75%);
+$app-header-border-focus-color: mix($sidebar-light-icons-menu-hover-bg, $primary, 90%);
//Dark theme
$dark-bg-theme: darken($sidebar-dark-icons-menu-bg, 4%);
$dark-tree-node-hover-bg: $sidebar-dark-apps-menu-title-bg;
$dark-tree-node-selected-bg: darken($sidebar-dark-apps-menu-title-bg, 4%);
$dark-surface-bg: lighten($sidebar-dark-icons-menu-bg, 5%);
+$dark-menu-bg: darken($sidebar-dark-icons-menu-bg, 1.5%);
+$dark-menu-surface-border: mix($theme-muted-blue, $dark-menu-bg, 18%);
+$dark-highlighted-action-bg: mix($primary, $dark-menu-bg, 55%);
+$dark-action-state-bg: mix($primary, $dark-menu-bg, 78%);
$dark-surface-border: lighten($sidebar-dark-icons-menu-border-color, 10%);
$dark-item-color: lighten($gray-light, 8%);
$dark-item-hover-color: lighten($gray-light, 14%);
+$dark-control-state-color: mix($white, $theme-muted-blue, 55%);
$dark-item-disabled-color: darken($gray-light, 12%);
$dark-border-subtle: darken($sidebar-dark-icons-menu-border-color, 3%);
$dark-table-row-hover-bg: $sidebar-dark-icons-menu-bg;
@@ -116,11 +130,11 @@ $light-surface-border: mix($primary, $gray-light, 14%);
$light-item-color: darken($gray-dark, 18%);
$light-item-hover-color: darken($gray-dark, 28%);
$light-item-disabled-color: lighten($gray-dark, 18%);
-$light-table-head-bg: #F3F7FD;
$light-table-row-hover-bg: mix($table-bg-hover, $white, 50%);
$light-table-row-selected-bg: mix($selected-background, $white, 50%);
$light-row-selected-bg: darken($table-bg-hover, 4%);
$light-menu-surface-bg: #eef4fc;
+$light-overlay-menu-bg: #e3ecf9;
$light-menu-surface-border: #cfdded;
$light-menu-item-hover-bg: #bdd7f4;
$light-menu-surface-shadow: 0 12px 24px rgba(27, 56, 94, 0.14);
diff --git a/frontend/src/styles/components/_view_switch.scss b/frontend/src/styles/components/_view_switch.scss
new file mode 100644
index 00000000..3cb0c2ce
--- /dev/null
+++ b/frontend/src/styles/components/_view_switch.scss
@@ -0,0 +1,54 @@
+@mixin view-switch-theme(
+ $surface,
+ $border,
+ $text,
+ $muted,
+ $state-background
+) {
+ .view-switch {
+ border-color: $border;
+ background: $surface;
+ }
+
+ .view-switch__option {
+ color: $muted;
+
+ &:hover,
+ &:focus-visible,
+ &.active {
+ color: $text;
+ background: $state-background;
+ }
+ }
+}
+
+.view-switch {
+ width: fit-content;
+ height: 1.9rem;
+ margin: 0 0 0 auto;
+ padding: 0.15rem;
+ display: flex;
+ align-items: center;
+ gap: 0.3rem;
+ border: 1px solid;
+ border-radius: $border-radius;
+}
+
+.view-switch__option {
+ min-width: 4.2rem;
+ height: 1.5rem;
+ padding: 0 0.68rem;
+ border: 0;
+ border-radius: $border-radius - 0.1rem;
+ background: transparent;
+ font-size: $font-size-xs;
+ font-weight: 500;
+ line-height: 1;
+ cursor: pointer;
+ transition: color 0.15s ease, background-color 0.15s ease;
+
+ &:focus-visible {
+ outline: 2px solid rgba($primary, 0.4);
+ outline-offset: 1px;
+ }
+}
diff --git a/frontend/src/styles/components/index.scss b/frontend/src/styles/components/index.scss
index 14a0ba89..dd9ca0e0 100644
--- a/frontend/src/styles/components/index.scss
+++ b/frontend/src/styles/components/index.scss
@@ -15,8 +15,8 @@
@import 'colors';
@import 'badges';
@import 'buttons';
-@import 'boxes';
@import 'profile';
+@import 'view_switch';
@import 'recents';
@import 'search';
@import 'typehead';
diff --git a/frontend/src/styles/variables.scss b/frontend/src/styles/variables.scss
index 40449b0d..e0521e79 100644
--- a/frontend/src/styles/variables.scss
+++ b/frontend/src/styles/variables.scss
@@ -41,7 +41,6 @@ $black: #111;
$primary: #1c68b0;
$success: $green;
$secondary: #c3cee0;
-$secondary-light: #dde3ee;
$info: $aqua;
$warning: $orange;
$danger: $red;
@@ -94,7 +93,6 @@ $placeholder-color: $muted;
$enable-transitions: true;
$enable-rounded: true;
$enable-grid-classes: true;
-$enable-sidebar-nav-rounded: false;
$border-color: $gray-lighter;
$hr-color: $secondary;
@@ -146,14 +144,9 @@ $input-group-addon-padding-x: .5rem !default;
$input-group-addon-padding-y: .3rem !default;
$input-padding-x: .5rem !default;
$input-padding-y: .3rem !default;
-$input-font-size: $font-size-base !default;
-$input-font-size-lg: $font-size-lg !default;
-$form-group-margin-bottom: 0.6rem;
$form-check-margin-bottom: 0;
-//$form-label-font-size: $font-size-xs;
$form-label-margin-bottom: 0.25rem;
-//$form-text-font-size: $font-size-xs;
$form-select-padding-x: .5rem !default;
$form-select-padding-y: .3rem !default;
$form-select-font-size: $font-size-base;
@@ -176,7 +169,7 @@ $dropdown-link-color: #444;
$dropdown-link-active-color: $dropdown-link-color;
$dropdown-link-hover-bg: $table-bg-hover !important;
$dropdown-link-active-bg: $dropdown-link-hover-bg;
-$dropdown-item-padding-y: .4rem;
+$dropdown-item-padding-y: .45rem;
$dropdown-item-padding-x: .4rem;
$dropdown-padding-y: .375rem;
$dropdown-divider-margin-y: .25rem;
@@ -216,8 +209,6 @@ $btn-padding-y: .25rem;
$btn-padding-x: .5rem;
$btn-padding-x-xs: .5rem !default;
$btn-padding-y-xs: .2rem !default;
-$btn-padding-x-xxs: .2rem !default;
-$btn-padding-y-xxs: .1rem !default;
$btn-padding-y-lg: .4rem !default;
$btn-padding-x-lg: .9rem !default;
$btn-disabled-opacity: 0.4;
@@ -257,4 +248,3 @@ $pagination-focus-box-shadow: none;
// --------------------------------------------------------
$list-group-border-width: .5px;
-$list-group-font-size: $font-size-xs;