mirror of
https://github.com/mempool/mempool.git
synced 2025-04-09 04:18:27 +02:00
disable selector when forcing custom theme
This commit is contained in:
parent
4c697d0008
commit
788a95b260
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -27,17 +27,21 @@
|
||||
<div class="selector">
|
||||
<app-rate-unit-selector></app-rate-unit-selector>
|
||||
</div>
|
||||
<div class="selector d-none d-sm-flex">
|
||||
<app-theme-selector></app-theme-selector>
|
||||
</div>
|
||||
@if (!env.customize?.theme) {
|
||||
<div class="selector d-none d-sm-flex">
|
||||
<app-theme-selector></app-theme-selector>
|
||||
</div>
|
||||
}
|
||||
<a *ngIf="stateService.isMempoolSpaceBuild" class="btn btn-purple sponsor d-none d-sm-flex justify-content-center" [routerLink]="['/login' | relativeUrl]">
|
||||
<span *ngIf="loggedIn" i18n="shared.my-account" class="nowrap">My Account</span>
|
||||
<span *ngIf="!loggedIn" i18n="shared.sign-in" class="nowrap">Sign In</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="selector d-flex d-sm-none justify-content-center ml-auto mr-auto mt-0">
|
||||
<app-theme-selector></app-theme-selector>
|
||||
</div>
|
||||
@if (!env.customize?.theme) {
|
||||
<div class="selector d-flex d-sm-none justify-content-center ml-auto mr-auto mt-0">
|
||||
<app-theme-selector></app-theme-selector>
|
||||
</div>
|
||||
}
|
||||
@if (!enterpriseInfo?.footer_img) {
|
||||
<a *ngIf="stateService.isMempoolSpaceBuild" class="btn btn-purple sponsor d-flex d-sm-none justify-content-center ml-auto mr-auto mt-0 mb-2" [routerLink]="['/login' | relativeUrl]">
|
||||
<span *ngIf="loggedIn" i18n="shared.my-account" class="nowrap">My Account</span>
|
||||
|
Loading…
x
Reference in New Issue
Block a user