refs #235 Add about window for linux and windows

This commit is contained in:
AkiraFukushima 2018-04-17 22:34:09 +09:00
parent 2e36781229
commit 8046c0882a
3 changed files with 17 additions and 2 deletions

5
package-lock.json generated
View File

@ -62,6 +62,11 @@
"integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=",
"dev": true
},
"about-window": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/about-window/-/about-window-1.11.0.tgz",
"integrity": "sha512-L8bNfM/EBSrEntLqAXFLJbu9uV0TIb6di3BEgwo4KjFzMkEk25r987Vz6gj5CvELb5JR5wrlcoz8xouLGiVFwg=="
},
"accepts": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz",

View File

@ -82,6 +82,7 @@
}
},
"dependencies": {
"about-window": "^1.11.0",
"axios": "^0.18.0",
"electron-json-storage": "^4.0.2",
"electron-log": "^2.2.14",

View File

@ -7,6 +7,7 @@ import log from 'electron-log'
import windowStateKeeper from 'electron-window-state'
import simplayer from 'simplayer'
import path from 'path'
import openAboutWindow from 'about-window'
import Authentication from './auth'
import Account from './account'
@ -84,7 +85,15 @@ function createWindow () {
submenu: [
{
label: 'About Whalebird',
role: 'about'
role: 'about',
click: () => {
openAboutWindow({
icon_path: path.resolve(__dirname, '../../build/icons/256x256.png'),
copyright: 'Copyright (c) 2018 AkiraFukushima',
package_json_dir: path.resolve(__dirname, '../../'),
open_devtools: process.env.NODE_ENV !== 'production'
})
}
},
{
type: 'separator'
@ -203,7 +212,7 @@ function createWindow () {
width: mainWindowState.width,
height: mainWindowState.height,
useContentSize: true,
icon: path.join(__dirname, '../../build/icons/256x256.png')
icon: path.resolve(__dirname, '../../build/icons/256x256.png')
})
mainWindowState.manage(mainWindow)