- onenote.git
- src
- electron
- main
- menus.js
This file ( 1kB ) exceeds the allowed full mode (48 kb) size.
The editor full hight is disabled, only scrolling is allowed..
If you wish to edit a file, it is recommended to use the scroll mode as some users do not like the full height
mode, although some users like it.
const action = require('./action')
const menus = {
default: () => {
let visible = false;
if (global.p3x.onenote.window.onenote !== undefined) {
visible = global.p3x.onenote.isVisible() ? true : false;
}
let menus = [
{
label: global.p3x.onenote.lang.label.personalHome,
click: action.home
},
{
label: global.p3x.onenote.lang.label.corporateHome,
click: action.corporate
},
{
label: global.p3x.onenote.lang.label.clearCache,
click: action.restart
},
{ type: 'separator' },
{
label: global.p3x.onenote.lang.label.quit,
click: action.quit
}
]
if (!global.p3x.onenote.disableHide) {
const hideMenu = {
label: visible ? global.p3x.onenote.lang.label.hide : global.p3x.onenote.lang.label.show,
click: action.toggleVisible
}
menus.splice(3, 0, hideMenu);
}
return menus;
}
}
module.exports = menus;