mirror of
https://github.com/sern-handler/gui
synced 2026-06-06 01:16:54 +00:00
feat: footer, dark mode and functionality card
This commit is contained in:
@@ -1,41 +1,44 @@
|
||||
const path = require('path')
|
||||
const path = require('path');
|
||||
const { app, BrowserWindow } = require('electron');
|
||||
const isDev = require('electron-is-dev');
|
||||
|
||||
function createWindow() {
|
||||
const mainWindow = new BrowserWindow({
|
||||
width: 800,
|
||||
height: 600,
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
},
|
||||
icon: './icons/icon.png',
|
||||
show: false,
|
||||
autoHideMenuBar: true,
|
||||
title: 'sern'
|
||||
});
|
||||
const mainWindow = new BrowserWindow({
|
||||
width: 800,
|
||||
height: 600,
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
},
|
||||
icon: './icons/icon.png',
|
||||
show: false,
|
||||
autoHideMenuBar: true,
|
||||
title: 'sern',
|
||||
});
|
||||
if (isDev) {
|
||||
mainWindow.loadURL('http://localhost:3000');
|
||||
} else {
|
||||
mainWindow.loadFile(path.join(__dirname, '../build/index.html'));
|
||||
}
|
||||
|
||||
isDev ? mainWindow.loadURL('http://localhost:3000') : mainWindow.loadFile(path.join(__dirname, '../build/index.html'))
|
||||
mainWindow.on('ready-to-show', () => {
|
||||
mainWindow.show();
|
||||
});
|
||||
|
||||
mainWindow.on('ready-to-show', () => {
|
||||
mainWindow.show()
|
||||
})
|
||||
|
||||
mainWindow.on('page-title-updated', function(e) {
|
||||
e.preventDefault()
|
||||
});
|
||||
mainWindow.on('page-title-updated', function (e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
|
||||
app.whenReady().then(createWindow);
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit();
|
||||
}
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit();
|
||||
}
|
||||
});
|
||||
|
||||
app.on('activate', () => {
|
||||
if (BrowserWindow.getAllWindows().length === 0) {
|
||||
createWindow();
|
||||
}
|
||||
});
|
||||
if (BrowserWindow.getAllWindows().length === 0) {
|
||||
createWindow();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<title>React App</title>
|
||||
<title>sern</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
|
||||
Reference in New Issue
Block a user