store locale + theme in profile, add theme switch

This commit is contained in:
_Bastler
2021-04-03 13:38:25 +02:00
parent 40ade2ca06
commit 288bdb3956
6 changed files with 82 additions and 13 deletions
+8 -3
View File
@@ -9,13 +9,18 @@
<span class="spacer"></span>
<ng-container>
<button *ngIf="locales.length > 1" mat-button [matMenuTriggerFor]="menu">
<mat-icon>language</mat-icon>
<button mat-button [matMenuTriggerFor]="menu">
<mat-icon>settings</mat-icon>
<mat-icon>arrow_drop_down</mat-icon>
</button>
<mat-menu #menu="matMenu">
<a *ngFor="let locale of locales" mat-menu-item (click)="setLocale(locale)">{{'locale.' + locale + '.long' |
i18n}} <mat-icon inline=true *ngIf="locale == currentLocale">done</mat-icon></a>
i18n}} <mat-icon inline=true *ngIf="locale == currentLocale">done</mat-icon></a>
<a mat-menu-item>
<mat-slide-toggle (change)="darkThemeChange($event)" [checked]="darkTheme == 'true'">
{{'profileField.name.darkTheme' | i18n}}
</mat-slide-toggle>
</a>
</mat-menu>
</ng-container>
</mat-toolbar>