mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
reorganize menu for Linux
This commit is contained in:
@@ -269,7 +269,7 @@ app.on('ready', function () {
|
|||||||
checkUpdate()
|
checkUpdate()
|
||||||
|
|
||||||
mainWindow = require('./main-window')
|
mainWindow = require('./main-window')
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32' || process.platform === 'linux') {
|
||||||
mainWindow.setMenu(menu)
|
mainWindow.setMenu(menu)
|
||||||
}
|
}
|
||||||
mainWindow.on('close', function (e) {
|
mainWindow.on('close', function (e) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ const mainWindow = require('./main-window')
|
|||||||
|
|
||||||
const OSX = process.platform === 'darwin'
|
const OSX = process.platform === 'darwin'
|
||||||
const WIN = process.platform === 'win32'
|
const WIN = process.platform === 'win32'
|
||||||
|
const LINUX = process.platform === 'linux'
|
||||||
|
|
||||||
var boost = {
|
var boost = {
|
||||||
label: 'Boostnote',
|
label: 'Boostnote',
|
||||||
@@ -58,23 +59,6 @@ var file = {
|
|||||||
mainWindow.webContents.send('nav-new-folder')
|
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'
|
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 = {
|
var edit = {
|
||||||
label: 'Edit',
|
label: 'Edit',
|
||||||
submenu: [
|
submenu: [
|
||||||
@@ -201,4 +198,6 @@ var help = {
|
|||||||
|
|
||||||
module.exports = process.platform === 'darwin'
|
module.exports = process.platform === 'darwin'
|
||||||
? [boost, file, edit, view, window, help]
|
? [boost, file, edit, view, window, help]
|
||||||
|
: process.platform === 'win32'
|
||||||
|
? [file, view, help]
|
||||||
: [file, view, help]
|
: [file, view, help]
|
||||||
|
|||||||
Reference in New Issue
Block a user