mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
reorganize menu for Linux
This commit is contained in:
@@ -269,7 +269,7 @@ app.on('ready', function () {
|
||||
checkUpdate()
|
||||
|
||||
mainWindow = require('./main-window')
|
||||
if (process.platform === 'win32') {
|
||||
if (process.platform === 'win32' || process.platform === 'linux') {
|
||||
mainWindow.setMenu(menu)
|
||||
}
|
||||
mainWindow.on('close', function (e) {
|
||||
|
||||
@@ -5,6 +5,7 @@ const mainWindow = require('./main-window')
|
||||
|
||||
const OSX = process.platform === 'darwin'
|
||||
const WIN = process.platform === 'win32'
|
||||
const LINUX = process.platform === 'linux'
|
||||
|
||||
var boost = {
|
||||
label: 'Boostnote',
|
||||
@@ -58,23 +59,6 @@ var file = {
|
||||
mainWindow.webContents.send('nav-new-folder')
|
||||
}
|
||||
},
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: 'Save Post',
|
||||
// accelerator: OSX ? 'Command + S' : 'Control + S',
|
||||
// click: function () {
|
||||
// mainWindow.webContents.send('detail-save')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: 'Save All Posts',
|
||||
// accelerator: OSX ? 'Command + Shift + S' : 'Control + Shift + S',
|
||||
// click: function () {
|
||||
// mainWindow.webContents.send('top-save-all')
|
||||
// }
|
||||
// },
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
@@ -88,6 +72,19 @@ var file = {
|
||||
]
|
||||
}
|
||||
|
||||
if (LINUX) {
|
||||
file.submenu.push({
|
||||
type: 'separator'
|
||||
})
|
||||
file.submenu.push({
|
||||
label: 'Quit Boostnote',
|
||||
accelerator: 'Control + Q',
|
||||
click: function () {
|
||||
mainWindow.close()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
var edit = {
|
||||
label: 'Edit',
|
||||
submenu: [
|
||||
@@ -201,4 +198,6 @@ var help = {
|
||||
|
||||
module.exports = process.platform === 'darwin'
|
||||
? [boost, file, edit, view, window, help]
|
||||
: process.platform === 'win32'
|
||||
? [file, view, help]
|
||||
: [file, view, help]
|
||||
|
||||
Reference in New Issue
Block a user