Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.
TypeScript cloud-alternativecollaborationcollaborative-editingdropboxfile-serverfile-sharingfile-storagefile-syncfull-text-searchhomelabnextcloudon-premiseopen-sourceprivacy-firstprivate-cloudrealtimesecureself-hostedstorage-serverwebdav
chore(frontend): improve sidebar left, context menu
johaven774e311d63c8
diff --git a/frontend/src/app/applications/spaces/spaces.constants.ts b/frontend/src/app/applications/spaces/spaces.constants.tsindex dcfc688d..6306047d 100644--- a/frontend/src/app/applications/spaces/spaces.constants.ts+++ b/frontend/src/app/applications/spaces/spaces.constants.ts@@ -8,10 +8,10 @@ import {faFolderClosed,faLayerGroup,faLink,- faReply,faShare,faShareNodes,- faTrashCan+ faTrashCan,+ faUser} from '@fortawesome/free-solid-svg-icons'import { SPACES_BASE_ROUTE } from '@sync-in-server/backend/src/applications/spaces/constants/routes'import { SPACE_ALIAS, SPACE_OPERATION, SPACE_REPOSITORY } from '@sync-in-server/backend/src/applications/spaces/constants/spaces'@@ -41,7 +41,7 @@ export const SPACES_ICON = {PERSONAL: faFolderClosed,SPACES: faLayerGroup,SHARES: faShareNodes,- SHARED_WITH_ME: faReply,+ SHARED_WITH_ME: faUser,SHARED_WITH_OTHERS: faShare,ANCHORED: faAnchor,LINKS: faLink,diff --git a/frontend/src/app/common/components/navigation-view/navigation-view.component.ts b/frontend/src/app/common/components/navigation-view/navigation-view.component.tsindex 98132806..37e6d81c 100644--- a/frontend/src/app/common/components/navigation-view/navigation-view.component.ts+++ b/frontend/src/app/common/components/navigation-view/navigation-view.component.ts@@ -35,11 +35,11 @@ export class NavigationViewComponent {protected readonly icons = { faCog, faArrowDown, faArrowUp }protected viewsMode: Record<string, ViewMode> = {tl: { enabled: false, text: 'List', icon: faThList },- th: { enabled: true, text: 'S', icon: faTh, dimensions: 96, image: 56, imageRes: 128, faSize: 30, textSize: 10, margins: 18 },+ th: { enabled: true, text: 'S', icon: faTh, dimensions: 96, image: 56, imageRes: 128, faSize: 30, textSize: 11, margins: 18 },thM: { enabled: true, text: 'M', icon: faTh, dimensions: 112, image: 72, imageRes: 192, faSize: 34, textSize: 11, margins: 18 },thL: { enabled: true, text: 'L', icon: faTh, dimensions: 152, image: 112, imageRes: 256, faSize: 50, textSize: 12, margins: 18 },thXl: { enabled: true, text: 'XL', icon: faTh, dimensions: 192, image: 152, imageRes: 512, faSize: 65, textSize: 13, margins: 18 },- thXxl: { enabled: true, text: 'XXL', icon: faThLarge, dimensions: 232, image: 192, imageRes: 1024, faSize: 80, textSize: 13, margins: 18 }+ thXxl: { enabled: true, text: 'XXL', icon: faThLarge, dimensions: 232, image: 192, imageRes: 1024, faSize: 80, textSize: 14, margins: 18 }}private readonly layout = inject(LayoutService)diff --git a/frontend/src/app/common/components/virtual-scroll.component.ts b/frontend/src/app/common/components/virtual-scroll.component.tsindex f70bfd7a..b710d8b3 100644--- a/frontend/src/app/common/components/virtual-scroll.component.ts+++ b/frontend/src/app/common/components/virtual-scroll.component.ts@@ -3,6 +3,7 @@ import {Component,ElementRef,EventEmitter,+ HostBinding,inject,Input,NgZone,@@ -89,6 +90,11 @@ export class VirtualScrollComponent<T> implements OnInit, OnChanges, OnDestroy {switchMap((state) => of(state).pipe(repeat({ count: 30, delay: 10 }))))+ @HostBinding('class.virtual-scroll-border-top')+ get withBorderTop(): boolean {+ return !this.galleryMode+ }+ngOnInit() {this.resizeOffsetHeight(true)this.addParentEventHandlers()diff --git a/frontend/src/styles/components/_app.scss b/frontend/src/styles/components/_app.scssindex ce49121c..b4bd515e 100755--- a/frontend/src/styles/components/_app.scss+++ b/frontend/src/styles/components/_app.scss@@ -175,16 +175,9 @@tr {th {white-space: nowrap;- font-weight: 400;- border-top: none;- border-left: none;- border-right: none;- border-bottom: .5px solid;+ font-weight: 500;+ border: none;padding: .25rem 0.5rem;-- &:last-child {- border-right: .5px solid;- }}}}diff --git a/frontend/src/styles/components/_boxes.scss b/frontend/src/styles/components/_boxes.scssindex 64f7438c..fbdf5d20 100644--- a/frontend/src/styles/components/_boxes.scss+++ b/frontend/src/styles/components/_boxes.scss@@ -100,7 +100,7 @@}.recents-grid {- padding: 10px 5px;+ padding: 5px;row-gap: 16px;}diff --git a/frontend/src/styles/components/_contextmenu.scss b/frontend/src/styles/components/_contextmenu.scssindex 5c78bf1f..efce5976 100644--- a/frontend/src/styles/components/_contextmenu.scss+++ b/frontend/src/styles/components/_contextmenu.scss@@ -9,7 +9,7 @@}.ngx-contextmenu {- padding: .25rem !important;+ padding: $dropdown-item-padding-y !important;font-size: $font-size-xs !important;border-width: .5px !important;border-style: solid !important;diff --git a/frontend/src/styles/components/_core.scss b/frontend/src/styles/components/_core.scssindex ac9bd6f1..4b282345 100644--- a/frontend/src/styles/components/_core.scss+++ b/frontend/src/styles/components/_core.scss@@ -1,13 +1,9 @@-html, body {- font-optical-sizing: auto;- letter-spacing: -0.012em;- text-rendering: optimizeLegibility;- background-color: $sidebar-dark-icons-menu-bg;- -webkit-font-smoothing: antialiased;+html {+ height: 100%;+ scroll-behavior: smooth;scrollbar-width: thin;scrollbar-color: rgba(155, 155, 155, 0.5) transparent;- font-size: 1rem;- height: 100%;+ -webkit-text-size-adjust: 100%;::-webkit-scrollbar {width: 8px;@@ -24,6 +20,18 @@ html, body {}}+body {+ margin: 0;+ height: 100%;+ font-optical-sizing: auto;+ letter-spacing: -0.012em;+ text-rendering: optimizeLegibility;+ font-kerning: normal;+ -webkit-font-smoothing: antialiased;+ -moz-osx-font-smoothing: grayscale;+ background-color: $sidebar-dark-icons-menu-bg;+}+.wrapper {display: flex;flex-direction: column;diff --git a/frontend/src/styles/components/_sidebar_left.scss b/frontend/src/styles/components/_sidebar_left.scssindex 12e74459..3d9031f6 100755--- a/frontend/src/styles/components/_sidebar_left.scss+++ b/frontend/src/styles/components/_sidebar_left.scss@@ -186,7 +186,7 @@display: flex;flex-direction: column;flex: 1 1 auto;- padding-top: 8px;+ padding-top: 4px;}.menus-group {@@ -197,8 +197,8 @@.menu {display: flex;align-items: center;- min-height: $sidebar-apps-height;- height: $sidebar-apps-height;+ min-height: calc(#{$sidebar-apps-height} - 3px);+ height: calc(#{$sidebar-apps-height} - 3px);min-width: $sidebar-apps-menus-width;font-size: $font-size-xs;cursor: pointer;@@ -215,12 +215,13 @@> a {display: flex;align-items: center;+ gap: .5rem;flex: 1 1 auto;width: auto;height: calc(#{$sidebar-apps-height} - 6px);- margin: 3px 8px;+ margin: 0 6px;padding: 0 10px;- border-radius: 10px;+ border-radius: $btn-border-radius;max-height: none;@extend .text-truncate;@extend .no-select-pointer;@@ -228,11 +229,12 @@> fa-icon {font-size: $font-size-md;- margin-right: .5rem;- width: 1.25rem;- min-width: 1.25rem;+ margin-right: 0;+ width: .95rem;+ min-width: .95rem;display: inline-flex;justify-content: center;+ opacity: .88;}.menu-badge {diff --git a/frontend/src/styles/components/_theme_dark.scss b/frontend/src/styles/components/_theme_dark.scssindex 8b88f2e1..ac0b9d4f 100755--- a/frontend/src/styles/components/_theme_dark.scss+++ b/frontend/src/styles/components/_theme_dark.scss@@ -66,9 +66,8 @@//&.submenu {// background-color: darken($sidebar-dark-apps-menu-bg, 3%);//}- &:hover, &.active {- background: transparent;+ &:hover, &.active {> a {background: $sidebar-dark-apps-menu-hover-bg;color: $sidebar-dark-apps-menu-hover-color;@@ -121,7 +120,6 @@.menu {> a {color: $sidebar-dark-icons-menu-color;- border-bottom: .5px solid $sidebar-dark-icons-menu-bg;&:hover, &.active {color: $gray-lightest;@@ -299,6 +297,11 @@.dropdown-divider {border-top-color: var(--menu-surface-border, var(--btn-premium-secondary-border)) !important;}++ .virtual-scroll-border-top {+ border-top: 0.5px solid darken($sidebar-dark-icons-menu-border-color, 3%) !important;+ }+.app-table {color: $gray-light;// Bootstrap 5 fix@@ -306,17 +309,6 @@border-top: 1px solid $sidebar-dark-icons-menu-border-color;}- thead {- background-color: lighten($sidebar-dark-apps-menu-title-bg, 4%);-- tr {- th {- border-right-color: $sidebar-dark-icons-menu-border-color;- border-bottom-color: $sidebar-dark-icons-menu-border-color;- }- }- }-tbody tr {border-bottom-color: darken($sidebar-dark-icons-menu-border-color, 3%) !important;@@ -354,6 +346,7 @@}}.app-foot-menu {+ border-top: 0.5px solid darken($sidebar-dark-icons-menu-border-color, 3%) !important;background-color: $sidebar-dark-icons-menu-bg;color: darken($gray-light, 5%);}diff --git a/frontend/src/styles/components/_theme_light.scss b/frontend/src/styles/components/_theme_light.scssindex b34f9e8c..c73d1d93 100755--- a/frontend/src/styles/components/_theme_light.scss+++ b/frontend/src/styles/components/_theme_light.scss@@ -61,6 +61,7 @@.sidebar-apps-menus {.menus-content {+ background-color: #f6f9fb;border-right: .5px solid $sidebar-light-apps-menu-border-color;}@@ -74,25 +75,20 @@//&.submenu {// background-color: darken($sidebar-light-apps-menu-bg, 3%);//}- &:hover, &.active {- background: transparent;-- > a {- > fa-icon:first-child {- color: darken($primary, 5%);- }- }- }&:hover {> a {- background: mix($primary, $sidebar-light-apps-menu-bg, 8%);+ background: lighten(#d4e1f1, 2%);}}&.active {> a {- background: mix($primary, $sidebar-light-apps-menu-bg, 18%);+ background: darken(#d4e1f1, 4%);+ font-weight: 500;+ > fa-icon:first-child {+ color: darken($primary, 5%);+ }}}}@@ -135,10 +131,6 @@> a {color: $sidebar-light-apps-menu-color;- &:not(:first-child) {- border-top: .5px solid $gray-lightest;- }-&:hover, &.active {color: $black;background: $secondary;@@ -311,6 +303,9 @@.dropdown-divider {border-top-color: var(--menu-surface-border, var(--btn-premium-secondary-border)) !important;}+ .virtual-scroll-border-top {+ border-top: 0.5px solid $gray-light;+ }.app-table {color: $body-color;// Bootstrap 5 fix@@ -318,17 +313,6 @@border-top: 1px solid $gray-light;}- thead {- background: linear-gradient(170deg, mix($white, $primary, 88%) 0%, mix($white, $gray-lightest, 92%) 100%);;-- tr {- th {- border-right-color: $gray-light;- border-bottom-color: $gray-light;- }- }- }-tbody tr {border-bottom-color: $gray-lighter !important;@@ -342,7 +326,7 @@}tbody td:not(:first-child) {- color: lighten($gray-dark, 5%);+ color: $custom-color;}}.app-table-striped {@@ -362,12 +346,13 @@background: linear-gradient(170deg, mix($white, $primary, 88%) 0%, mix($white, $gray-lightest, 92%) 100%);.dropdown-menu {- --menu-surface-bg: #EBF0F5;+ --menu-surface-bg: #f6f9fc;}}.app-foot-menu {+ border-top: 0.5px solid $gray-light;background: #eaf1f8;- color: $dropdown-link-color;+ color: $custom-color;}.app-thumbs {background-color: $gray-lighter;@@ -497,7 +482,7 @@// border-left: .5px solid $sidebar-light-apps-menu-border-color;//}.ngx-contextmenu {- background-color: #EBF0F5 !important;+ background-color: #f6f9fc !important;border-color: mix($primary, $gray-light, 14%) !important;> button.ngx-context-menu-item {diff --git a/frontend/src/styles/variables.scss b/frontend/src/styles/variables.scssindex 73d94936..213989d7 100644--- a/frontend/src/styles/variables.scss+++ b/frontend/src/styles/variables.scss@@ -7,11 +7,11 @@ $application_background: linear-gradient(to bottom right, rgb(2, 0, 36) 0%, rgb(// Colors$white: #ffffff;$gray-dark: #384042;-$gray: #9faecb;-$gray-mid: #b9c5da;-$gray-light: #d4dbe8;-$gray-lighter: #e1e6ef;-$gray-lightest: #eef1f6;+$gray: #95a8c6;+$gray-mid: #b3c2d9;+$gray-light: #cfd9e7;+$gray-lighter: #dde5f0;+$gray-lightest: #edf2f8;$light-blue: #2e92ce;$lighter-blue: #94c7e8;$red: #dc3545;@@ -73,7 +73,7 @@ $font-size-sm: 0.82rem; // 13.1px$font-size-xs: 0.7625rem; // 12.2px$font-size-xxs: 0.7rem; // 11.2px$font-size-xxxs: 0.645rem; // 10.3px-$font-size-xxxxs: 0.5875rem; // 9.4px+$font-size-xxxxs: 0.6rem; // 9.6px//LAYOUT//--------------------------------------------------------@@ -103,7 +103,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: .25rem;+$dropdown-item-padding-y: .2rem;$dropdown-item-padding-x: 1rem;$dropdown-padding-y: .2rem;$dropdown-header-color: #8aa4af;