mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-03 22:38:48 +08:00
Prettified Code!
This commit is contained in:
1 parent
73fedc7593
commit
3e0654b435
10 files changed
+53
-52
No files matched your search
@@ -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();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user