1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-03 00:53:23 +00:00

[feat(Account Switching)] Allow for extending application state (#584)

* [feat(Account Switching)] Allow for extending application state

* [bug(Account Switching)] Remove hardcoded dev urls

* [bug(Account Switching)] Init Account when signing in

* [bug(Account Switching)] Check for state migration version in local storage for web

* [bug(Account Switching)] Fix never lock configurations

* [chore] Prettier merge

* [bug] Move environmentUrls to global state

* [chore] Ran prettier

* [bug]change storage location for enityId and type

* [style] Ran prettier

Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com>
This commit is contained in:
Addison Beck
2021-12-20 08:48:47 -05:00
committed by GitHub
parent 59a5300458
commit 9e26336549
11 changed files with 198 additions and 179 deletions

View File

@@ -130,9 +130,6 @@ export class AccountSettings {
enableMinimizeToTray?: boolean;
enableStartToTray?: boolean;
enableTray?: boolean;
environmentUrls?: any = {
server: "bitwarden.com",
};
equivalentDomains?: any;
minimizeOnCopyToClipboard?: boolean;
neverDomains?: { [id: string]: any };

View File

@@ -24,4 +24,7 @@ export class GlobalState {
noAutoPromptBiometrics?: boolean;
noAutoPromptBiometricsText?: string;
stateVersion: number;
environmentUrls?: any = {
server: "bitwarden.com",
};
}

View File

@@ -1,8 +1,8 @@
import { Account } from "./account";
import { GlobalState } from "./globalState";
export class State {
accounts: { [userId: string]: Account } = {};
export class State<TAccount extends Account = Account> {
accounts: { [userId: string]: TAccount } = {};
globals: GlobalState = new GlobalState();
activeUserId: string;
}