mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 21:58:03 +00:00
feat: windows缩略图工具栏 (#1551)
* 从 v1 引入图标 * feat: windows缩略图工具栏 * 更新windows任务栏控制图标 图标基于microsoft fluent icon修改 移除like和unlike * update * 启动时显示taskbar buttons
This commit is contained in:
parent
d3e44541fb
commit
07d7564b1e
20 changed files with 122 additions and 12 deletions
|
|
@ -33,7 +33,7 @@ const IpcRendererReact = () => {
|
|||
}, [track])
|
||||
|
||||
useEffect(() => {
|
||||
window.ipcRenderer?.send(IpcChannels.SetTrayLikeState, {
|
||||
window.ipcRenderer?.send(IpcChannels.Like, {
|
||||
isLiked: userLikedSongs?.ids?.includes(track?.id ?? 0) ?? false,
|
||||
})
|
||||
}, [userLikedSongs, track])
|
||||
|
|
@ -46,6 +46,13 @@ const IpcRendererReact = () => {
|
|||
setIsPlaying(playing)
|
||||
}, [state])
|
||||
|
||||
useEffectOnce(() => {
|
||||
// 用于显示 windows taskbar buttons
|
||||
if (playerSnapshot.track?.id) {
|
||||
window.ipcRenderer?.send(IpcChannels.Pause)
|
||||
}
|
||||
})
|
||||
|
||||
return <></>
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue