summarylogtreecommitdiffstats
path: root/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'index.js')
-rw-r--r--index.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/index.js b/index.js
new file mode 100644
index 000000000000..603152e615c0
--- /dev/null
+++ b/index.js
@@ -0,0 +1,24 @@
+const { app, BrowserWindow, Menu } = require('electron')
+const path = require('path')
+
+function createWindow () {
+ const win = new BrowserWindow({
+ titleBarStyle: 'hidden',
+ width: 1024,
+ height: 768,
+ useContentSize: true,
+ icon: path.join(__dirname, './logo.png')
+ })
+ win.loadURL('https://aigepu.com/zhipu');
+}
+
+app.on('window-all-closed', function () {
+ if (process.platform !== 'darwin') app.quit()
+})
+app.whenReady().then(() => {
+ createWindow()
+ Menu.setApplicationMenu(null);
+ app.on('activate', function () {
+ if (BrowserWindow.getAllWindows().length === 0) createWindow()
+ })
+})