feat: 完善一些内容#22
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
本 PR 综合性地完善了播放器、设置、歌词、队列、搜索建议等多块体验:拆分了内外两套播放队列面板(QueuePopover 用于普通页面、QueuePanel 用于全屏播放器),引入全屏封面布局选项 (coverLayout)、性能监视器开关 (showPerformanceMonitor),并把 dot-path 工具下沉到 shared/utils/path.ts 在渲染端与主进程复用。同时新增了循环/随机模式 toast 提示、底栏更多菜单("添加到歌单")、搜索建议跳转到艺人/专辑/歌单页等流程,并修复 QualityControl 对云盘歌曲的禁切换、歌词渲染器 freeze/resume 时 ResizeObserver 的衔接、PlayerBackground 仅在展开时切换等若干细节。
Changes:
- 拆分播放队列 UI:新增
QueuePopover/QueuePanel+useQueuePanel共享逻辑,移除PlaylistPanel.vue;status.playlistOpen拆为outerQueueOpen/fullQueueOpen。 - 新增全屏封面布局、性能监视器、循环/随机模式 toast、底栏更多菜单、搜索建议跳转、
canRemove权限传递、QualityControl云盘禁切换等。 - 抽出
shared/utils/path.ts与LyricActions.vue,全屏播放器歌词组件支持initialTime初始时间。
Reviewed changes
Copilot reviewed 45 out of 46 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/types/settings.ts | 新增 CoverLayout 类型与 showPerformanceMonitor 字段 |
| src/stores/settings.ts | 用 deepAssign 替换浅合并;setSystem 改为 IPC 异步并立即就地 mutate;复用 setByPath |
| src/stores/status.ts | 拆分 playlistOpen 为 outerQueueOpen / fullQueueOpen |
| src/settings/useSettingModel.ts | 改用 @shared/utils/path 的 helpers |
| src/settings/categories/player.ts | 增加 coverLayout 选项 |
| src/settings/categories/general.ts | 增加 showPerformanceMonitor 开关 |
| src/pages/Collection.vue | 透传 can-remove |
| src/layouts/MainLayout.vue | 删除旧 SDrawer 播放列表抽屉,挂载性能监视器;toast max=1 |
| src/i18n/locales/{zh-CN,en-US}.json | 新增 repeat/shuffle/coverLayout/showPerformanceMonitor 等 i18n |
| src/core/player/index.ts | 切换循环/随机模式时弹 toast,防止重复 |
| src/core/hotkey/registry.ts | toggle 队列时按 isExpanded 走不同状态 |
| src/composables/useTrackMenu.ts | 增加 canRemove / hidePlayActions 选项 |
| src/composables/useToast.ts | 注释/参数精简 |
| src/composables/useQueuePanel.ts | 新建:队列面板共享逻辑 |
| src/composables/useMultiSelect.ts | 接受 canRemove ref |
| src/components/ui/SVirtualList.vue | scrollToIndex 不再加 paddingTop;新增 hideScrollbar / cover |
| src/components/ui/STooltip/SSelect/SPopselect/SPopover/SDropdownMenu/SContextMenu/SCombobox.vue | 统一加 collision-padding="12" |
| src/components/ui/SNumberInput.vue | unit 渲染微调 |
| src/components/ui/SToast.vue | 图标改 material-symbols 系列、动画/before-leave 处理 |
| src/components/SPerformanceMonitor.vue | 新建:浮动 FPS/MS/MEM 监视器 |
| src/components/player/TrackInfo.vue | 信息行间距收紧 |
| src/components/player/Toolbar.vue | 队列按钮按 cover 区分内外队列 |
| src/components/player/QualityControl.vue | 云盘曲禁切换,附加 STooltip 不支持提示 |
| src/components/player/PlayerBar.vue | 新增"更多"菜单 + PlaylistPickerDialog |
| src/components/player/Lyrics/index.vue | 支持 initialTime |
| src/components/player/Lyrics/engine/index.ts | freeze/resume 配对 ResizeObserver;setLyrics 使用 pendingPlayTime 而非 0 |
| src/components/player/FullPlayer/QueuePanel.vue | 新建:全屏封面主题队列面板 |
| src/components/player/FullPlayer/PlayerData.vue | 始终显示元信息标签行 |
| src/components/player/FullPlayer/PlayerCover.vue | 新增 fullscreen 模式;高清封面按 isExpanded 仅本地加载 |
| src/components/player/FullPlayer/PlayerBackground.vue | 仅展开时切换背景;相同源不切换 |
| src/components/player/FullPlayer/LyricActions.vue | 抽出歌词侧边操作栏 |
| src/components/player/FullPlayer/index.vue | 全屏封面布局、initialLyricTimeMs、添加到歌单按钮、与队列面板的交互 |
| src/components/list/SongList.vue | 透传 can-remove |
| src/components/list/QueuePopover.vue | 新建:普通页面用的小队列 popover(含拖排序) |
| src/components/list/PlaylistPanel.vue | 删除 |
| src/components/layout/NavSearch.vue | 建议项跳转到艺人/专辑/歌单页 |
| shared/utils/path.ts | 新建:通用 getByPath / setByPath |
| electron/main/store/utils.ts | 改为转出 @shared/utils/path |
| components.d.ts | 自动生成:新组件与新图标 |
Comment on lines
+31
to
+42
| const pickerMode = computed<ContentScope>(() => | ||
| media.track?.source === "netease" ? "online" : "local", | ||
| ); | ||
|
|
||
| /** 歌曲菜单 */ | ||
| const { items: menuItems, handleSelect: onMenuSelect } = useTrackMenu(toRef(media, "track"), { | ||
| hidePlayActions: true, | ||
| onAddToPlaylist: (track) => { | ||
| pickerTracks.value = [track]; | ||
| pickerOpen.value = true; | ||
| }, | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.