update: add menu toggle command

This commit is contained in:
ocogeclub 2021-02-17 22:06:05 +09:00
parent f61f2a7ab7
commit c74ffbeff3
4 changed files with 24 additions and 14 deletions

View File

@ -59,18 +59,11 @@ app.on('ready', () => {
label: 'Menu',
submenu: [
{
label: 'Quit',
label: 'Toggle Menu Bar',
click: () => {
app.quit();
win.setMenuBarVisibility(!win.menuBarVisible);
},
accelerator: "CommandOrControl+Q"
},
{
label: 'Toggle Developer Tools',
click: () => {
win.webContents.toggleDevTools()
},
accelerator: "F12"
accelerator: "CommandOrControl+Shift+M"
},
{
label: 'Reload',
@ -87,6 +80,13 @@ app.on('ready', () => {
},
accelerator: "CommandOrControl+M"
},
{
label: 'Toggle Developer Tools',
click: () => {
win.webContents.toggleDevTools()
},
accelerator: "F12"
},
{
label: 'About',
click: () => {
@ -107,6 +107,13 @@ app.on('ready', () => {
require('electron').dialog.showMessageBox(win, options);
},
accelerator: "CommandOrControl+I"
},
{
label: 'Quit',
click: () => {
app.quit();
},
accelerator: "CommandOrControl+Q"
}
]
}

6
package-lock.json generated
View File

@ -775,9 +775,9 @@
}
},
"electron": {
"version": "11.2.1",
"resolved": "https://registry.npmjs.org/electron/-/electron-11.2.1.tgz",
"integrity": "sha512-Im1y29Bnil+Nzs+FCTq01J1OtLbs+2ZGLLllaqX/9n5GgpdtDmZhS/++JHBsYZ+4+0n7asO+JKQgJD+CqPClzg==",
"version": "11.2.3",
"resolved": "https://registry.npmjs.org/electron/-/electron-11.2.3.tgz",
"integrity": "sha512-6yxOc42nDAptHKNlUG/vcOh2GI9x2fqp2nQbZO0/3sz2CrwsJkwR3i3oMN9XhVJaqI7GK1vSCJz0verOkWlXcQ==",
"dev": true,
"requires": {
"@electron/get": "^1.0.1",

View File

@ -19,7 +19,7 @@
},
"homepage": "https://github.com/ocogeclub/ocoge#readme",
"devDependencies": {
"electron": "11.2.1",
"electron": "11.2.3",
"electron-rebuild": "^2.3.4"
},
"dependencies": {

View File

@ -536,6 +536,9 @@ if (typeof require == 'function') {
elec.newFile = () => { ; }
elec.setWsChanged = () => { ; }
// マスコット
elec.getMascotFilePath = () => './img/cogechee.png';
//ワークスペースのダウンロード
elec.saveWsFile = xml_text => {
let blob = new Blob([xml_text], { "type": "text/xml" });