From a3f4f5b105680d6eb79d46951cb4691bda2c5f29 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Thu, 18 Jun 2026 16:12:45 +0300 Subject: [PATCH] UI: hide sidebar-close on mobile, widen user-menu trigger, tighten side-menu typography Gate the sidebar-close toolbar button behind sidenavDesktop so it doesn't render on the overlay sidenav. User-menu trigger button now fills the rail width via ViewEncapsulation.None + a tb-user-menu-panel that matches the trigger width. Toggled section labels bump to weight 500, hover background drop, and inactive labels lean on --mat-button-text-label-text-weight. Add sidebar-open SVG to the icon registry for the collapsed-sidenav trigger. --- .../src/app/modules/home/home.component.html | 4 +- ui-ngx/src/app/modules/home/home.component.ts | 4 ++ .../home/menu/menu-toggle.component.scss | 15 +++-- .../home/menu/side-menu.component.scss | 5 +- .../components/user-menu.component.html | 7 ++- .../components/user-menu.component.scss | 57 ++++++++++--------- .../shared/components/user-menu.component.ts | 11 +++- ui-ngx/src/app/shared/models/icon.models.ts | 1 + ui-ngx/src/assets/icons/sidebar-open.svg | 4 ++ 9 files changed, 69 insertions(+), 39 deletions(-) create mode 100644 ui-ngx/src/assets/icons/sidebar-open.svg diff --git a/ui-ngx/src/app/modules/home/home.component.html b/ui-ngx/src/app/modules/home/home.component.html index e11b4c624b..d99a075107 100644 --- a/ui-ngx/src/app/modules/home/home.component.html +++ b/ui-ngx/src/app/modules/home/home.component.html @@ -25,7 +25,9 @@
- + @if (sidenavDesktop) { + + }
diff --git a/ui-ngx/src/app/modules/home/home.component.ts b/ui-ngx/src/app/modules/home/home.component.ts index 924c892f9c..f7a423e135 100644 --- a/ui-ngx/src/app/modules/home/home.component.ts +++ b/ui-ngx/src/app/modules/home/home.component.ts @@ -52,6 +52,7 @@ export class HomeComponent extends PageComponent implements AfterViewInit, OnIni sidenavMode: 'over' | 'push' | 'side' = 'side'; sidenavOpened = true; + sidenavDesktop = true; logo = 'assets/logo_title_black.svg'; @@ -83,6 +84,7 @@ export class HomeComponent extends PageComponent implements AfterViewInit, OnIni const isGtSm = this.breakpointObserver.isMatched(MediaBreakpoints['gt-sm']); this.sidenavMode = isGtSm ? 'side' : 'over'; this.sidenavOpened = isGtSm; + this.sidenavDesktop = isGtSm; this.breakpointObserver .observe(MediaBreakpoints['gt-sm']) @@ -91,9 +93,11 @@ export class HomeComponent extends PageComponent implements AfterViewInit, OnIni if (state.matches) { this.sidenavMode = 'side'; this.sidenavOpened = true; + this.sidenavDesktop = true; } else { this.sidenavMode = 'over'; this.sidenavOpened = false; + this.sidenavDesktop = false; } } ); diff --git a/ui-ngx/src/app/modules/home/menu/menu-toggle.component.scss b/ui-ngx/src/app/modules/home/menu/menu-toggle.component.scss index 84aac93c5a..c327fcb6fb 100644 --- a/ui-ngx/src/app/modules/home/menu/menu-toggle.component.scss +++ b/ui-ngx/src/app/modules/home/menu/menu-toggle.component.scss @@ -20,11 +20,13 @@ .tb-button-toggle { &.tb-toggled { border-bottom: 1px solid rgba(0, 0, 0, 0.05); + --mat-button-text-label-text-weight: 500; } .tb-toggle-icon { display: inline-block; - width: 15px; - min-width: 15px; + width: 12px; + min-width: 12px; + font-size: 12px; margin: auto 0 auto auto; background-size: 100% auto; transition: transform .3s ease-in-out; @@ -61,10 +63,13 @@ transition-property: height; a.mat-mdc-button { - padding: 0 16px 0 32px; - font-weight: 500; + //padding: 0 16px 0 32px; + .mat-icon { + visibility: hidden; + } + /* font-weight: 500; text-transform: none !important; - text-rendering: optimizeLegibility; + text-rendering: optimizeLegibility;*/ } } } diff --git a/ui-ngx/src/app/modules/home/menu/side-menu.component.scss b/ui-ngx/src/app/modules/home/menu/side-menu.component.scss index d58bc0f649..1578e1c7c8 100644 --- a/ui-ngx/src/app/modules/home/menu/side-menu.component.scss +++ b/ui-ngx/src/app/modules/home/menu/side-menu.component.scss @@ -23,6 +23,7 @@ padding: 12px 0; margin: 0; list-style: none; + --mat-button-text-label-text-weight: 400; } .tb-side-menu ul { @@ -43,13 +44,12 @@ --mat-button-text-label-text-color: rgba(0, 0, 0, .76); &:hover { border-bottom: none; - background-color: rgba(255,255,255,0.08); } &:focus { border-bottom: none; } &.tb-active { - background-color: rgba(255, 255, 255, .15); + background-color: rgba(0, 0, 0, .08); } .mat-icon { margin-right: 8px; @@ -63,7 +63,6 @@ text-overflow: ellipsis; white-space: nowrap; display: inline-flex; - font-weight: 400; & > span { overflow: hidden; text-overflow: ellipsis; diff --git a/ui-ngx/src/app/shared/components/user-menu.component.html b/ui-ngx/src/app/shared/components/user-menu.component.html index c9207da9af..102a3f6120 100644 --- a/ui-ngx/src/app/shared/components/user-menu.component.html +++ b/ui-ngx/src/app/shared/components/user-menu.component.html @@ -15,7 +15,8 @@ limitations under the License. --> - - + @if (authority$ | async; as authority) { -
+