rebuild project
This commit is contained in:
1 parent
69a284cc16
commit
84e1e376b9
9 files changed
+8
-7
No files matched your search
@@ -0,0 +1,34 @@
|
||||
import { app, BrowserWindow, Menu, MenuItem, dialog, nativeTheme } from 'electron';
|
||||
import {initMenu} from './AppMenu'
|
||||
|
||||
let mainWindow: BrowserWindow = null;
|
||||
nativeTheme.themeSource = 'dark';
|
||||
let createWindow = function () {
|
||||
mainWindow = new BrowserWindow({
|
||||
width: 1280,
|
||||
height: 800,
|
||||
webPreferences: {
|
||||
nodeIntegration: true
|
||||
}
|
||||
// fullscreenable:false,
|
||||
// maximizable:false
|
||||
});
|
||||
// mainWindow.webContents.openDevTools();
|
||||
mainWindow.loadFile('index.html');
|
||||
mainWindow.on('closed', function () {
|
||||
mainWindow = null
|
||||
});
|
||||
initMenu(mainWindow);
|
||||
}
|
||||
app.on('ready', createWindow)
|
||||
app.on('window-all-closed', () => {
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit()
|
||||
}
|
||||
})
|
||||
|
||||
app.on('activate', () => {
|
||||
if (mainWindow === null) {
|
||||
createWindow()
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user