Skip to content

Files

Latest commit

6cd8af9 · Aug 7, 2019

History

History
51 lines (43 loc) · 980 Bytes

about.js

File metadata and controls

51 lines (43 loc) · 980 Bytes
ferossdcposch
Sep 2, 2016
Sep 2, 2016
1
const about = module.exports = {
May 29, 2016
May 29, 2016
2
init,
3
4
5
win: null
}
Sep 2, 2016
Sep 2, 2016
6
7
const config = require('../../config')
const electron = require('electron')
May 29, 2016
May 29, 2016
9
function init () {
10
if (about.win) {
May 29, 2016
May 29, 2016
11
return about.win.show()
Sep 2, 2016
Sep 2, 2016
14
const win = about.win = new electron.BrowserWindow({
15
16
17
18
19
20
21
22
23
24
backgroundColor: '#ECECEC',
center: true,
fullscreen: false,
height: 170,
icon: getIconPath(),
maximizable: false,
minimizable: false,
resizable: false,
show: false,
skipTaskbar: true,
Jun 3, 2016
Jun 3, 2016
25
title: 'About ' + config.APP_WINDOW_TITLE,
26
useContentSize: true,
Aug 7, 2019
Aug 7, 2019
27
28
29
webPreferences: {
nodeIntegration: true
},
30
31
32
33
34
35
36
37
width: 300
})
win.loadURL(config.WINDOW_ABOUT)
// No menu on the About window
win.setMenu(null)
Sep 23, 2016
Sep 23, 2016
38
win.once('ready-to-show', function () {
39
40
41
42
43
44
45
46
47
48
49
50
51
win.show()
})
win.once('closed', function () {
about.win = null
})
}
function getIconPath () {
return process.platform === 'win32'
? config.APP_ICON + '.ico'
: config.APP_ICON + '.png'
}