import ElectronStore from 'electron-store'; const STORE_KEY_STARTUPHIDEWINDOW = 'options.startupHideWindow'; export class Storage { private readonly store: ElectronStore; constructor() { this.store = new ElectronStore({ schema: { options: { type: 'object', properties: { startupHideWindow: { type: 'boolean' } }, default: { startupHideWindow: false } } }, encryptionKey: 'ucap', fileExtension: 'dat' }); } get startupHideWindow(): boolean { return this.store.get(STORE_KEY_STARTUPHIDEWINDOW, false); } set startupHideWindow(startupHideWindow: boolean) { this.store.set(STORE_KEY_STARTUPHIDEWINDOW, startupHideWindow); } }