diff --git a/app/main.js b/app/main.js index 716288c..ea2438b 100644 --- a/app/main.js +++ b/app/main.js @@ -7,32 +7,25 @@ const { BrowserWindow } = electron // Keep a global reference of the window object, if you don't, the window will // be closed automatically when the JavaScript object is garbage collected. let win + const template = [ { - label: '地图', + label: '功能', submenu: [ { - label: '加载', - accelerator: 'CmdOrCtrl+L', + label: '地图编辑', + accelerator: 'CmdOrCtrl+1', click() { - console.log('load map') - dialog.showOpenDialog({ - properties: ['openDirectory'] - }).then(result => { - console.log(result) // 输出结果 - if (result.filePaths.length > 0) { - // ipcRenderer.send(result.filePaths); - win.webContents.send('load', result.filePaths) - } - }) + console.log('地图编辑') + win.loadURL('https://test.kingsome.cn/html/shoot_editor/index.html') } }, { - label: '保存', - accelerator: 'CmdOrCtrl+S', + label: '配置管理', + accelerator: 'CmdOrCtrl+2', click() { - console.log('save map') - win.webContents.send('save', '') + console.log('配置管理') + win.loadURL('https://test.kingsome.cn/html/cfgtool/index.html') } } ]