39 lines
810 B
TypeScript
39 lines
810 B
TypeScript
import Store from "electron-store";
|
|
|
|
const store = new Store({
|
|
defaults: {
|
|
settings: {
|
|
runOnStartup: true,
|
|
filepaths: [],
|
|
qbFilePath: "",
|
|
runWatcherOnStartup: true,
|
|
polling: {
|
|
enabled: false,
|
|
interval: 30000,
|
|
},
|
|
},
|
|
app: {
|
|
windowBounds: {
|
|
width: 800,
|
|
height: 600,
|
|
x: undefined,
|
|
y: undefined,
|
|
},
|
|
user: null,
|
|
isTest: false,
|
|
bodyshop: {},
|
|
masterdata: {
|
|
opcodes: null,
|
|
},
|
|
},
|
|
},
|
|
});
|
|
|
|
// store.onDidAnyChange((newValue, oldValue) => {
|
|
// console.log("Settings changed", newValue, oldValue);
|
|
// const mainWindow = BrowserWindow.getAllWindows()[0];
|
|
// mainWindow?.webContents.send(ipcTypes.toRenderer.store.didChange, newValue);
|
|
// });
|
|
|
|
export default store;
|