Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add menu item "About" to "Help" #3079

Merged
merged 1 commit into from
Jul 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions lib/main-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const BrowserWindow = electron.BrowserWindow
const shell = electron.shell
const ipc = electron.ipcMain
const mainWindow = require('./main-window')
const os = require('os')

const macOS = process.platform === 'darwin'
// const WIN = process.platform === 'win32'
Expand Down Expand Up @@ -411,6 +412,28 @@ const help = {
click () { shell.openExternal('https://github.com/TobseF/boostnote-markdown-cheatsheet/blob/master/BOOSTNOTE_MARKDOWN_CHEAT_SHEET.md') }
}
]
},
{
type: 'separator'
},
{
label: 'About',
click () {
const version = electron.app.getVersion()
const electronVersion = process.versions.electron
const chromeVersion = process.versions.chrome
const nodeVersion = process.versions.node
const v8Version = process.versions.v8
const OSInfo = `${os.type()} ${os.arch()} ${os.release()}`
const detail = `Version: ${version}\nElectron: ${electronVersion}\nChrome: ${chromeVersion}\nNode.js: ${nodeVersion}\nV8: ${v8Version}\nOS: ${OSInfo}`
electron.dialog.showMessageBox(BrowserWindow.getFocusedWindow(),
{
title: 'BoostNote',
message: 'BoostNote',
type: 'info',
detail: `\n${detail}`
})
}
}
]
}
Expand Down