diff --git a/package.json b/package.json index 4e4080a2..3c025836 100644 --- a/package.json +++ b/package.json @@ -228,7 +228,10 @@ "darkModeSupport": true, "target": [ "dmg" - ] + ], + "extendInfo": { + "NSUserNotificationAlertStyle": "alert" + } } } } diff --git a/src/main/plugins/playbackNotifications.ts b/src/main/plugins/playbackNotifications.ts index 27f06d74..b9807d53 100644 --- a/src/main/plugins/playbackNotifications.ts +++ b/src/main/plugins/playbackNotifications.ts @@ -44,33 +44,37 @@ export default class playbackNotifications { 'text': 'Next' } ], - toastXml: ` - - - ${a.name ?? ''} - ${a.artistName ?? ''} - ${a.albumName ?? ''} - - - - - - - ` + toastXml: ` + + + + ${a?.name.replace(/&/g, '&')} + ${a?.artistName.replace(/&/g, '&')} — ${a?.albumName.replace(/&/g, '&')} + + + + + + + ` }); - this._notification.on('click', (event: any) => { + // image implementation in windows toasts + //img + + this._notification.on('click', (_: any) => { this._utils.getWindow().show() this._utils.getWindow().focus() }) - this._notification.on('close', (event: any) => { + this._notification.on('close', (_: any) => { this._notification = undefined; }) this._notification.on('action', (event: any, action: any) => { - if (action === 'Play/Pause') { + if (action === 0) { this._utils.playback.playPause() - } else if (action === 'Next') { + } else if (action === 1) { this._utils.playback.next() } })