Update Electron menus

Signed-off-by: Marquis Kurt <software@marquiskurt.net>
This commit is contained in:
Marquis Kurt 2019-10-03 16:17:08 -04:00
parent 0d4ec15e44
commit 91c1694560
No known key found for this signature in database
GPG Key ID: 725636D259F5402D
1 changed files with 41 additions and 22 deletions

View File

@ -20,7 +20,7 @@ let mainWindow;
// to when authorizing Hyperspace. // to when authorizing Hyperspace.
protocol.registerSchemesAsPrivileged([ protocol.registerSchemesAsPrivileged([
{ scheme: 'hyperspace', privileges: { standard: true, secure: true } } { scheme: 'hyperspace', privileges: { standard: true, secure: true } }
]) ]);
/** /**
* Determine whether the desktop app is on macOS * Determine whether the desktop app is on macOS
@ -218,15 +218,8 @@ function createMenubar() {
click() { click() {
safelyGoTo("hyperspace://hyperspace/app/#compose") safelyGoTo("hyperspace://hyperspace/app/#compose")
} }
},
{ type: 'separator' },
{
label: 'Edit Profile',
accelerator: "Shift+CmdOrCtrl+P",
click() {
safelyGoTo("hyperspace://hyperspace/app/#/you")
} }
},
] ]
}, },
{ {
@ -284,7 +277,7 @@ function createMenubar() {
] ]
}, },
{ {
label: "Places", label: "Timelines",
submenu: [ submenu: [
{ {
label: 'Home', label: 'Home',
@ -308,27 +301,53 @@ function createMenubar() {
} }
}, },
{ {
label: 'Recommendations', label: 'Messages',
accelerator: "CmdOrCtrl+3", accelerator: "CmdOrCtrl+3",
click() {
safelyGoTo("hyperspace://hyperspace/app/#/messages")
}
}
]
},
{
label: "Account",
submenu: [
{
label: 'Notifications',
accelerator: "Alt+CmdOrCtrl+N",
click() {
safelyGoTo("hyperspace://hyperspace/app/#/notifications")
}
},
{
label: 'Recommendations...',
accelerator: "Alt+CmdOrCtrl+R",
click() { click() {
safelyGoTo("hyperspace://hyperspace/app/#/recommended") safelyGoTo("hyperspace://hyperspace/app/#/recommended")
} }
}, },
{ type: 'separator' }, { type: 'separator' },
{ {
label: 'Notifications', label: 'Edit Profile',
accelerator: "CmdOrCtrl+4", accelerator: "Shift+CmdOrCtrl+P",
click() { click() {
safelyGoTo("hyperspace://hyperspace/app/#/notifications") safelyGoTo("hyperspace://hyperspace/app/#/you")
} }
}, },
{ {
label: 'Messages', label: 'Blocked Servers',
accelerator: "CmdOrCtrl+5", accelerator: "Shift+CmdOrCtrl+B",
click() { click() {
safelyGoTo("hyperspace://hyperspace/app/#/messages") safelyGoTo("hyperspace://hyperspace/app/#/blocked")
} }
}, },
{ type: 'separator'},
{
label: 'Switch Accounts...',
click() {
safelyGoTo("hyperspace://hyperspace/app/#/welcome")
}
}
] ]
}, },
{ {
@ -357,7 +376,7 @@ function createMenubar() {
} }
] ]
} }
] ];
if (process.platform === 'darwin') { if (process.platform === 'darwin') {
menuBar.unshift({ menuBar.unshift({
@ -386,7 +405,7 @@ function createMenubar() {
{ type: 'separator' }, { type: 'separator' },
{ role: 'quit' } { role: 'quit' }
] ]
}) });
// Edit menu // Edit menu
menuBar[2].submenu.push( menuBar[2].submenu.push(
@ -398,10 +417,10 @@ function createMenubar() {
{ role: 'stopspeaking' } { role: 'stopspeaking' }
] ]
} }
) );
// Window menu // Window menu
menuBar[5].submenu = [ menuBar[6].submenu = [
{ role: 'close' }, { role: 'close' },
{ role: 'minimize' }, { role: 'minimize' },
{ role: 'zoom' }, { role: 'zoom' },