Prettified Code!

This commit is contained in:
ethanweber authored and GitHub Action committed 2022-08-02 21:02:28 +00:00
1 parent 73fedc7593
commit 3e0654b435
10 files changed
+53 -52

No files matched your search

+9 -9
View File
@@ -1,7 +1,7 @@
const path = require("path");
const path = require('path');
const { app, BrowserWindow } = require("electron");
const isDev = require("electron-is-dev");
const { app, BrowserWindow } = require('electron');
const isDev = require('electron-is-dev');
function createWindow() {
// Create the browser window.
@@ -17,12 +17,12 @@ function createWindow() {
// win.loadFile("index.html");
win.loadURL(
isDev
? "http://localhost:3000"
: `file://${path.join(__dirname, "../build/index.html")}`
? 'http://localhost:3000'
: `file://${path.join(__dirname, '../build/index.html')}`,
);
// Open the DevTools.
if (isDev) {
win.webContents.openDevTools({ mode: "detach" });
win.webContents.openDevTools({ mode: 'detach' });
}
}
@@ -34,13 +34,13 @@ app.whenReady().then(createWindow);
// Quit when all windows are closed, except on macOS. There, it's common
// for applications and their menu bar to stay active until the user quits
// explicitly with Cmd + Q.
app.on("window-all-closed", () => {
if (process.platform !== "darwin") {
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit();
}
});
app.on("activate", () => {
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow();
}