35 lines
1.1 KiB
JavaScript
35 lines
1.1 KiB
JavaScript
const { app, Menu } = require('electron');
|
|
const ipc = require('electron').ipcMain;
|
|
|
|
const options = {userAgent: 'Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6F27E) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.83 Mobile Safari/537.36'};
|
|
|
|
module.exports.navitemplate = function(win){
|
|
const template = [
|
|
{
|
|
label: "My Page",
|
|
click(){ win.loadURL("http://imas.gree-apps.net/app/index.php/mypage",options)}
|
|
},
|
|
{
|
|
label: "Eigyo",click() {win.loadURL("http://imas.gree-apps.net/app/index.php/eigyo?from=mypage_main_button",options) }
|
|
},
|
|
{
|
|
label: "Lesson",
|
|
click() { win.loadURL("http://imas.gree-apps.net/app/index.php/lesson",options)}
|
|
},
|
|
{
|
|
label: "Gasha",
|
|
click() { win.loadURL("http://imas.gree-apps.net/app/index.php/gasha",options)}
|
|
},
|
|
{
|
|
label: "Event",
|
|
click() { win.loadURL("http://imas.gree-apps.net/app/index.php/event",options)}
|
|
},
|
|
]
|
|
return template;
|
|
}
|
|
module.exports.setdock = function(win) {
|
|
const dockMenu = Menu.buildFromTemplate(module.exports.navitemplate(win))
|
|
|
|
app.dock.setMenu(dockMenu);
|
|
}
|