deleting and getting things running fine

This commit is contained in:
talksik
2022-04-30 18:54:29 -05:00
parent 3bdb7e888f
commit b9141d643d
17 changed files with 11 additions and 935 deletions
-14
View File
@@ -10,7 +10,6 @@ import store from "./electron/store";
// whether you're running in development or production).
declare const MAIN_WINDOW_WEBPACK_ENTRY: string;
declare const MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY: string;
declare const SECOND_WINDOW_WEBPACK_ENTRY: string;
// Handle creating/removing shortcuts on Windows when installing/uninstalling.
if (require("electron-squirrel-startup")) {
@@ -21,7 +20,6 @@ if (require("electron-squirrel-startup")) {
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
export let browserWindow: BrowserWindow;
export let overlayWindow: BrowserWindow;
const createWindow = (): void => {
// Create the browser window.
@@ -34,23 +32,11 @@ const createWindow = (): void => {
icon: "./assets/1024x1024.icns",
});
overlayWindow = new BrowserWindow({
...Dimensions.default,
webPreferences: {
preload: MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY,
sandbox: true,
},
icon: "./assets/1024x1024.icns",
alwaysOnTop: true,
});
// and load the index.html of the app.
browserWindow.loadURL(MAIN_WINDOW_WEBPACK_ENTRY);
overlayWindow.loadURL(SECOND_WINDOW_WEBPACK_ENTRY);
// Open the DevTools.
browserWindow.webContents.openDevTools({ mode: "detach" });
overlayWindow.webContents.openDevTools({ mode: "detach" });
};
// This method will be called when Electron has finished