-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement macOS menu logic and streamline related features
- Added `setupDarwinMenu` for macOS-specific menu handling. - Removed manual `Menu.setApplicationMenu` call in favor of modular setup. - Cleaned up unused keyboard shortcuts, including Shift + F4 for resetting Last.fm keys. - Updated Discord RPC activity with conditional display options for small SoundCloud icon. - Simplified Last.fm integration by removing redundant error logging.
- Loading branch information
1 parent
e4fdf6e
commit 8b0e7f1
Showing
6 changed files
with
71 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
engine.bin | ||
node_modules | ||
dist | ||
build | ||
tsc | ||
**/.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { app, Menu, shell, MenuItemConstructorOptions } from 'electron'; | ||
|
||
const isMac = process.platform === 'darwin'; | ||
|
||
const template: Electron.MenuItemConstructorOptions[] = [{ | ||
label: 'Edit', | ||
submenu: [ | ||
{ role: 'undo' }, | ||
{ role: 'redo' }, | ||
{ type: 'separator' }, | ||
{ role: 'selectAll' }, | ||
{ role: 'cut' }, | ||
{ role: 'copy' }, | ||
{ role: 'paste' }, | ||
{ role: 'delete' }, | ||
] | ||
}, | ||
{ | ||
label: 'View', | ||
submenu: [ | ||
{ role: 'reload' }, | ||
{ type: 'separator' }, | ||
{ role: 'togglefullscreen' } | ||
] | ||
}, | ||
{ role: 'window', submenu: [{ role: 'minimize' }, { role: 'quit' }] }, | ||
{ | ||
label: 'Help', | ||
submenu: [{ | ||
label: 'Learn More', | ||
click() { | ||
require('electron').shell.openExternal('https://github.com/richardhbtz/soundcloud-rpc'); | ||
} | ||
}] | ||
} | ||
]; | ||
|
||
export function setupDarwinMenu(): void { | ||
const menu = Menu.buildFromTemplate(template); | ||
Menu.setApplicationMenu(menu); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters