feat: windows缩略图工具栏 (#1551)

* 从 v1 引入图标

* feat: windows缩略图工具栏

* 更新windows任务栏控制图标

图标基于microsoft fluent icon修改
移除like和unlike

* update

* 启动时显示taskbar buttons
This commit is contained in:
memorydream 2022-04-29 21:16:46 +08:00 committed by GitHub
parent d3e44541fb
commit 07d7564b1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 122 additions and 12 deletions

View file

@ -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 <></>
}