1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 01:33:33 +00:00

[refactor] Use ThemeType enum instead of string (#642)

This commit is contained in:
Addison Beck
2022-01-28 05:28:36 -05:00
committed by GitHub
parent 6b4ed5fcce
commit ca5b057b43
4 changed files with 11 additions and 6 deletions

View File

@@ -16,6 +16,7 @@ import { SendData } from "../models/data/sendData";
import { HtmlStorageLocation } from "../enums/htmlStorageLocation";
import { KdfType } from "../enums/kdfType";
import { StateVersion } from "../enums/stateVersion";
import { ThemeType } from "../enums/themeType";
import { EnvironmentUrls } from "../models/domain/environmentUrls";
@@ -191,7 +192,7 @@ export class StateMigrationService {
globals.ssoState = (await this.get<any>(v1Keys.ssoState)) ?? globals.ssoState;
globals.rememberedEmail =
(await this.get<string>(v1Keys.rememberedEmail)) ?? globals.rememberedEmail;
globals.theme = (await this.get<string>(v1Keys.theme)) ?? globals.theme;
globals.theme = (await this.get<ThemeType>(v1Keys.theme)) ?? globals.theme;
globals.vaultTimeout = (await this.get<number>(v1Keys.vaultTimeout)) ?? globals.vaultTimeout;
globals.vaultTimeoutAction =
(await this.get<string>(v1Keys.vaultTimeoutAction)) ?? globals.vaultTimeoutAction;