Merge branch 'main' into enhancement/radio

This commit is contained in:
Core 2022-05-21 12:42:45 +01:00 committed by GitHub
commit f1fb5e7cb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 75755 additions and 25524 deletions

View file

@ -259,7 +259,6 @@ export class AppEvents {
height: 20
}),
}
this.tray = new Tray(process.platform === 'win32' ? icons.win32 : (process.platform === 'darwin' ? icons.darwin : icons.linux))
this.tray.setToolTip(app.getName())
this.setTray(false)
@ -298,7 +297,63 @@ export class AppEvents {
private setTray(visible: boolean = utils.getWindow().isVisible()) {
this.i18n = utils.getLocale(utils.getStoreValue('general.language'))
const ciderIcon = nativeImage.createFromPath(path.join(__dirname, `../../resources/icons/icon.png`)).resize({
width: 24,
height: 24
})
const menu = Menu.buildFromTemplate([
{
label: app.getName(),
enabled: false,
icon: ciderIcon,
},
{type: 'separator'},
/* For now only idea i dont know if posible to implement
{
label: this.i18n['action.tray.listento'],
enabled: false,
},
{
visible: visible,
label: 'track info',
enabled: false,
},
{type: 'separator'},
*/
{
visible: (visible === false),
label: this.i18n['action.tray.playpause'],
click: () => {
utils.getWindow().webContents.executeJavaScript('MusicKitInterop.playPause()')
}
},
{
visible: (visible === false),
label: this.i18n['action.tray.next'],
click: () => {
utils.getWindow().webContents.executeJavaScript(`MusicKitInterop.next()`)
}
},
{
visible: (visible === false),
label: this.i18n['action.tray.previous'],
click: () => {
utils.getWindow().webContents.executeJavaScript(`MusicKitInterop.previous()`)
}
},
{type: 'separator'},
{
label: (visible ? this.i18n['action.tray.minimize'] : `${this.i18n['action.tray.show']}`),
click: () => {

View file

@ -65,6 +65,7 @@ export class BrowserWindow {
"pages/cider-playlist",
"pages/playlist-inline",
"pages/recordLabel",
"pages/cider-multiroom",
"pages/collection-list",
"pages/apple-curator",
"pages/artist",
@ -175,6 +176,10 @@ export class BrowserWindow {
page: "recordLabel_",
component: `<cider-recordlabel :data="showingPlaylist"></cider-recordlabel>`,
condition: `page.includes('recordLabel_')`
}, {
page: "multiroom",
component: `<cider-multiroom :data="multiroom"></cider-multiroom>`,
condition: `page.includes('multiroom')`
}, {
page: "curator_",
component: `<cider-recordlabel :data="showingPlaylist"></cider-recordlabel>`,

View file

@ -101,7 +101,7 @@ export class Store {
],
"settings": [
"CommandOrControl", // Who the hell uses a different key for this? Fucking Option?
"S"
","
],
"openDeveloperTools": [
"CommandOrControl",