parent
19c97fb796
commit
9a70e63e73
|
@ -246,8 +246,6 @@ export abstract class StateService<T extends Account = Account> {
|
||||||
value: { [cipherId: string]: LocalData },
|
value: { [cipherId: string]: LocalData },
|
||||||
options?: StorageOptions,
|
options?: StorageOptions,
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
getLocale: (options?: StorageOptions) => Promise<string>;
|
|
||||||
setLocale: (value: string, options?: StorageOptions) => Promise<void>;
|
|
||||||
getMinimizeOnCopyToClipboard: (options?: StorageOptions) => Promise<boolean>;
|
getMinimizeOnCopyToClipboard: (options?: StorageOptions) => Promise<boolean>;
|
||||||
setMinimizeOnCopyToClipboard: (value: boolean, options?: StorageOptions) => Promise<void>;
|
setMinimizeOnCopyToClipboard: (value: boolean, options?: StorageOptions) => Promise<void>;
|
||||||
getOrganizationInvitation: (options?: StorageOptions) => Promise<any>;
|
getOrganizationInvitation: (options?: StorageOptions) => Promise<any>;
|
||||||
|
|
|
@ -2,7 +2,6 @@ import { ThemeType } from "../../enums";
|
||||||
|
|
||||||
export class GlobalState {
|
export class GlobalState {
|
||||||
installedVersion?: string;
|
installedVersion?: string;
|
||||||
locale?: string;
|
|
||||||
organizationInvitation?: any;
|
organizationInvitation?: any;
|
||||||
rememberedEmail?: string;
|
rememberedEmail?: string;
|
||||||
theme?: ThemeType = ThemeType.System;
|
theme?: ThemeType = ThemeType.System;
|
||||||
|
|
|
@ -1171,23 +1171,6 @@ export class StateService<
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getLocale(options?: StorageOptions): Promise<string> {
|
|
||||||
return (
|
|
||||||
await this.getGlobals(this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()))
|
|
||||||
)?.locale;
|
|
||||||
}
|
|
||||||
|
|
||||||
async setLocale(value: string, options?: StorageOptions): Promise<void> {
|
|
||||||
const globals = await this.getGlobals(
|
|
||||||
this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()),
|
|
||||||
);
|
|
||||||
globals.locale = value;
|
|
||||||
await this.saveGlobals(
|
|
||||||
globals,
|
|
||||||
this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getMinimizeOnCopyToClipboard(options?: StorageOptions): Promise<boolean> {
|
async getMinimizeOnCopyToClipboard(options?: StorageOptions): Promise<boolean> {
|
||||||
return (
|
return (
|
||||||
(await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions())))
|
(await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions())))
|
||||||
|
|
Loading…
Reference in New Issue