summarylogtreecommitdiffstats
path: root/index.js
blob: 0087dcf254029fca3c62894ba8b209967e99a328 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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('http://zhipu.lezhi99.com/Zhipu-index.html');
}

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()
    })
})