mirror of
https://github.com/bitwarden/browser
synced 2025-12-23 03:33:54 +00:00
[Bug] VaultTimeout incorrectly defaults to "Never" (#1230)
* [Bug] VaultTimeout incorrectly defaults to "Never" The default desktop vault timeout value is "On Restart", but there is no default set for this in the state service and account model. This commit extends the StateService and Account model to consider the special vault timeout default requirements needed for desktop. * [style] Lint fixes * [chore] Update jslib
This commit is contained in:
20
src/models/account.ts
Normal file
20
src/models/account.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import {
|
||||
Account as BaseAccount,
|
||||
AccountSettings as BaseAccountSettings,
|
||||
} from "jslib-common/models/domain/account";
|
||||
|
||||
export class AccountSettings extends BaseAccountSettings {
|
||||
vaultTimeout: number = -1; // On Restart
|
||||
}
|
||||
|
||||
export class Account extends BaseAccount {
|
||||
settings?: AccountSettings = new AccountSettings();
|
||||
|
||||
constructor(init: Partial<Account>) {
|
||||
super(init);
|
||||
Object.assign(this.settings, {
|
||||
...new AccountSettings(),
|
||||
...this.settings,
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user