Compare commits

...

4 Commits

Author SHA1 Message Date
Damillora 2dba9271a9 fix icon on non-Mac 2017-07-07 14:57:43 +07:00
Damillora 73608d17e1 tweak menu behavior on non-Mac 2017-07-07 14:53:35 +07:00
Damillora 718bae29ab add checks for macOS 2017-07-07 14:44:26 +07:00
Damillora ef12775d84 add million live help 2017-07-04 02:32:21 +07:00
4 changed files with 13 additions and 4 deletions

View File

@ -182,5 +182,5 @@ module.exports.navitemplate = function(win){
module.exports.setdock = function(win) {
const dockMenu = Menu.buildFromTemplate(module.exports.navitemplate(win))
app.dock.setMenu(dockMenu);
if(process.platform == 'darwin' ) app.dock.setMenu(dockMenu);
}

View File

@ -13,9 +13,11 @@ const options = {userAgent: 'Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6
function createWindow () {
// Create the browser window.
win = new BrowserWindow({width: 480, height: 600,icon: path.join(__dirname, 'ic_launcher.png')})
win = new BrowserWindow({width: 480, height: 600,icon: path.join(__dirname, 'icon.png')})
setdock.setdock(win)
Menu.setApplicationMenu(themenu(win));
if(process.platform == 'darwin') { Menu.setApplicationMenu(themenu(win)); }
else { win.setMenu(themenu(win));
}
// and load the index.html of the app.
win.loadURL('http://pf.gree.net/58737',options);
// Open the DevTools.

View File

@ -50,12 +50,16 @@ module.exports = function(win){
label: 'Help',
role: 'help',
submenu: [
{
label: "Million Live! Help",
click() { win.loadURL("http://imas.gree-apps.net/app/index.php/help",options)}
},
{
label: "Project Homepage",
click(){shell.openExternal("https://github.com/Damillora/MillionHopes")}
},
{
label: 'About SoundCleod',
label: 'About Million Hopes',
click() {
prefman.showAbout();
},
@ -109,6 +113,8 @@ module.exports = function(win){
label: "File",
submenu: [
{label: 'Preferences',click(){prefman.showPreferences()}},
{type: 'separator'},
{label: 'Exit', click(){ app.quit() }},
],
visible: process.platform !== 'darwin'
})

View File

@ -10,6 +10,7 @@ require('electron-debug')();
function showPreferences_int(){
if(!preferencesWindow){
preferencesWindow = new BrowserWindow({width: 800, height: 600})
if (process.platform !== 'darwin') preferencesWindow.setMenu(null);
preferencesWindow.loadURL(url.format({
pathname: path.join(__dirname, 'preferences.html'),
protocol: 'file:',