-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 'about' dialog with version and logo
Fixes #8
- Loading branch information
1 parent
802ddf7
commit 002b927
Showing
3 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const electron = require('electron'); | ||
const dialog = electron.dialog || electron.remote.dialog; | ||
const BrowserWindow = electron.BrowserWindow || electron.remote.BrowserWindow; | ||
const openAboutWindow = require('about-window').default; | ||
const join = require('path').join; | ||
|
||
module.exports = { | ||
showAbout: callback => { | ||
return openAboutWindow({ | ||
icon_path: join(__dirname, 'logo.svg'), | ||
copyright: 'Copyright (c) 2018 DAISY Consortium', | ||
package_json_dir: __dirname, | ||
open_devtools: process.env.NODE_ENV !== 'production', | ||
}); | ||
}, | ||
}; |