Replaced electron-settings with store. Implemented job upsert logic.

This commit is contained in:
Patrick Fic
2020-10-15 15:18:38 -07:00
parent 67cae24b6c
commit e467f74362
18 changed files with 385 additions and 131 deletions

View File

@@ -1,16 +1,10 @@
const path = require("path");
const { app, BrowserWindow, Tray, Menu, ipcMain } = require("electron");
const isDev = require("electron-is-dev");
const settings = require("electron-settings");
const { default: ipcTypes } = require("../src/ipc.types");
const { store } = require("./electron-store");
require("./ipc-main-handler");
settings.configure({
defaults: {
foo: "bar",
},
});
// Conditionally include the dev tools installer to load React Dev Tools
let installExtension, REACT_DEVELOPER_TOOLS;
if (isDev) {
@@ -76,6 +70,8 @@ function createWindow() {
// mode: "detach"
});
}
mainWindow.maximize();
}
exports.mainWindow = mainWindow;
@@ -86,7 +82,7 @@ app.whenReady().then(() => {
createWindow();
if (isDev) {
console.log(`Path to Settings File: ${settings.file()}`);
console.log(`Path to Settings File: ${store.path}`);
installExtension(REACT_DEVELOPER_TOOLS)
.then((name) => console.log(`Added Extension: ${name}`))
.catch((error) => console.log(`An error occurred: , ${error}`));