Release: Quarkus backend, Keycloak login, game history, clock, bot, tutorial and rematch #3
@ -13,7 +13,7 @@ export type ThemeManagerEvents = "themechange";
|
|||||||
|
|
||||||
export class ThemeManager extends TinyEmitter {
|
export class ThemeManager extends TinyEmitter {
|
||||||
private _theme: Theme;
|
private _theme: Theme;
|
||||||
private _storage: any;
|
private _storage: Storage;
|
||||||
private _themes: Theme[];
|
private _themes: Theme[];
|
||||||
// The first theme is the default.
|
// The first theme is the default.
|
||||||
constructor(storage: Storage, themeList: Theme[] = themes) {
|
constructor(storage: Storage, themeList: Theme[] = themes) {
|
||||||
@ -34,7 +34,7 @@ export class ThemeManager extends TinyEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private writetToLocalStorage(value: Theme) {
|
private writetToLocalStorage(value: Theme) {
|
||||||
this._storage.set(THEME_ID, value.id);
|
this._storage.setString(THEME_ID, value.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
private readFromLocalStorage(): Theme | undefined {
|
private readFromLocalStorage(): Theme | undefined {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user