From ddfed6aedf79d4532a94f1957351e7eb6087f4a3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 16 Apr 2024 09:48:18 +0200 Subject: [PATCH] Fix top menu dropdowns --- .../shared-main/misc/top-menu-dropdown.component.html | 2 +- .../shared-main/misc/top-menu-dropdown.component.scss | 2 +- .../shared/shared-main/misc/top-menu-dropdown.component.ts | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.html b/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.html index 8d7864666..9d8a5ba68 100644 --- a/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.html +++ b/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.html @@ -28,7 +28,7 @@
  • diff --git a/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.scss b/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.scss index 531e36b03..47d6d8d01 100644 --- a/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.scss +++ b/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.scss @@ -16,7 +16,7 @@ ul { margin-top: 0 !important; } -.icon { +.dropdown-menu .dropdown-item { @include dropdown-with-icon-item; top: -1px; diff --git a/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts b/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts index 525375c50..eab69c58d 100644 --- a/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts +++ b/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.ts @@ -18,7 +18,7 @@ export type TopMenuDropdownParam = { label: string routerLink: string queryParams?: { [id: string]: string } - iconName?: GlobalIconName + iconName: GlobalIconName isDisplayed?: () => boolean // Default: () => true }[] @@ -80,10 +80,6 @@ export class TopMenuDropdownComponent implements OnInit, OnDestroy { this.routeSub = this.router.events .pipe(filter(event => event instanceof NavigationEnd)) .subscribe(() => this.updateChildLabels(window.location.pathname)) - - this.hasIcons = this.menuEntries.some( - e => e.children?.some(c => !!c.iconName) - ) } ngOnDestroy () {