From 788a95b26078841888126c660f0036eb32f34603 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Tue, 7 May 2024 23:31:51 +0000 Subject: [PATCH] disable selector when forcing custom theme --- frontend/src/app/services/theme.service.ts | 6 ++++-- .../global-footer/global-footer.component.html | 16 ++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/frontend/src/app/services/theme.service.ts b/frontend/src/app/services/theme.service.ts index 3bdb1c65b..0a0fdc505 100644 --- a/frontend/src/app/services/theme.service.ts +++ b/frontend/src/app/services/theme.service.ts @@ -17,7 +17,7 @@ export class ThemeService { private storageService: StorageService, private stateService: StateService, ) { - const theme = this.storageService.getValue('theme-preference') || this.stateService.env.customize?.theme || 'default'; + const theme = this.stateService.env.customize?.theme || this.storageService.getValue('theme-preference') || 'default'; this.apply(theme); } @@ -44,7 +44,9 @@ export class ThemeService { this.style = null; } } - this.storageService.setValue('theme-preference', theme); + if (!this.stateService.env.customize?.theme) { + this.storageService.setValue('theme-preference', theme); + } this.themeChanged$.next(this.theme); } } diff --git a/frontend/src/app/shared/components/global-footer/global-footer.component.html b/frontend/src/app/shared/components/global-footer/global-footer.component.html index a14076022..1a3d68cba 100644 --- a/frontend/src/app/shared/components/global-footer/global-footer.component.html +++ b/frontend/src/app/shared/components/global-footer/global-footer.component.html @@ -27,17 +27,21 @@
-
- -
+ @if (!env.customize?.theme) { +
+ +
+ } -
- -
+ @if (!env.customize?.theme) { +
+ +
+ } @if (!enterpriseInfo?.footer_img) {