-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.js
56 lines (47 loc) · 1.15 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
const { app, BrowserWindow, ipcMain, nativeTheme } = require('electron')
const path = require('path')
function createWindow () {
const win = new BrowserWindow({
frame: false,
title: 'CryptoCurrency 0.1.0 (92)',
icon: path.join(__dirname, "./assets/icon.ico"),
alwaysOnTop: true,
setVisibleOnAllWorkspaces: true,
refresh: 1000,
width: 415,
height: 650,
minWidth: 415,
minHeight: 650,
maxWidth: 515,
maxHeight: 750,
// resizable: false,
autoHideMenuBar: true,
titleBarStyle: 'hidden',
titleBarOverlay: {
color: '#18181c',
symbolColor: '#fff'
},
webPreferences: {
preload: path.join(__dirname, './script/preload.js'),
nodeIntegration: true,
},
})
win.loadFile('index.html')
}
app.whenReady().then(() => {
createWindow()
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})
})
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})
// Run Code for Windows, Mac and Linux:
// Mac: npm run package-mac
// Windows: npm run package-win
// Linus: npm run package-linux