feat: mac添加音乐控制图标 , 托盘菜单项,更新播放状态和当前歌曲信息的逻辑

feat #105
This commit is contained in:
alger
2025-03-31 23:05:19 +08:00
parent e0d13057c3
commit 374a7a837d
13 changed files with 416 additions and 53 deletions
+1
View File
@@ -20,6 +20,7 @@ declare global {
removeDownloadListeners: () => void;
onLanguageChanged: (callback: (locale: string) => void) => void;
invoke: (channel: string, ...args: any[]) => Promise<any>;
sendSong: (data: any) => void;
};
$message: any;
}
+1
View File
@@ -11,6 +11,7 @@ const api = {
restart: () => ipcRenderer.send('restart'),
openLyric: () => ipcRenderer.send('open-lyric'),
sendLyric: (data) => ipcRenderer.send('send-lyric', data),
sendSong: (data) => ipcRenderer.send('update-current-song', data),
unblockMusic: (id) => ipcRenderer.invoke('unblock-music', id),
// 歌词窗口关闭事件
onLyricWindowClosed: (callback: () => void) => {