mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 21:58:03 +00:00
feat: 实现托盘菜单 (#1538)
* 从 v1 添加托盘相关图标 * feat: ipcRenderer事件 * feat: 托盘菜单实现 * 修复合并后的错误 * fix: 托盘图标的like * 将 tray 相关的 ipc 放入ipcMain.ts * update * update * feat: 设置托盘Tooltip * fix * fix: tray play/pause fade * fix: 暂时将tray like与tooltip的设置移入Player组件中 useUserLikedTracksIDs 会在重新聚焦而不是切换track时触发,导致托盘无法实时更新数据 基于以上一点,在Player组件中有了一个用于设置tray数据的useEffect,故将tray tooltip的设置也放入其中,使tray的数据尽可能简单的和player数据保持一致 * 将部分ipcRenderer调用挪到单独的IpcRendererReact组件 * 移除SetTrayPlayState,复用已有channel * update
This commit is contained in:
parent
b1fd51233a
commit
ffdf66b57e
24 changed files with 392 additions and 19 deletions
|
|
@ -11,6 +11,7 @@ import './styles/accentColor.scss'
|
|||
import App from './App'
|
||||
import pkg from '../../package.json'
|
||||
import ReactGA from 'react-ga4'
|
||||
import { ipcRenderer } from '@/renderer/ipcRenderer'
|
||||
|
||||
ReactGA.initialize('G-KMJJCFZDKF')
|
||||
|
||||
|
|
@ -26,6 +27,8 @@ Sentry.init({
|
|||
tracesSampleRate: 1.0,
|
||||
})
|
||||
|
||||
ipcRenderer()
|
||||
|
||||
const container = document.getElementById('root') as HTMLElement
|
||||
const root = ReactDOMClient.createRoot(container)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue