Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
该 PR 为 SPlayer-Next 增加「自定义图片背景」外观风格:允许用户选择本地图片作为应用背景,并在图片风格下启用玻璃质感面板与相关 UI 适配;同时顺带对设置项 schema 做了按分类拆分的结构化重构,并对歌词渲染/部分 UI 组件样式做了调整。
Changes:
- 新增图片背景外观:主进程提供选图 IPC + 缓存到
app-cache/backgrounds,渲染端新增AppBackground与主题 store 状态(appearanceStyle / imageBackground / 取色)。 - 全局样式与组件适配图片风格(
bg-app、玻璃面板/表单底色、浮动布局播放栏等)。 - 设置项 schema 拆分到
src/settings/categories/*,并增强子项隐藏能力(hideChildren);同时改进歌词渲染器时间/动画冻结恢复逻辑。
Reviewed changes
Copilot reviewed 35 out of 37 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| uno.config.ts | 增加 glass-panel、bg-field UnoCSS shortcuts,支撑图片背景下的玻璃/表单底色一致性 |
| src/utils/color.ts | 调整浅色 surfaceAlt,并新增从图片 URL 提取主色的 Promise API |
| src/types/theme.ts | 新增图片背景相关类型(AppearanceStyle / ImageBackgroundConfig) |
| src/types/settings-schema.ts | 文档注释整理,并新增 hideChildren 以支持子项完全隐藏 |
| src/styles/global.css | 引入 --s-app-bg 与 image 风格下的背景/面板/弹层/表单控件样式策略 |
| src/stores/theme.ts | 增加图片背景状态、有效风格/颜色计算、启动与 src 变化时的取色流程、持久化字段扩展 |
| src/settings/schema.ts | settings schema 改为聚合各 category 文件,提升可维护性 |
| src/settings/categories/general.ts | general 分类拆分落地 |
| src/settings/categories/appearance.ts | appearance 分类拆分并新增“外观风格/背景参数”设置项 |
| src/settings/categories/player.ts | player 分类拆分落地 |
| src/settings/categories/lyric.ts | lyric 分类拆分落地 |
| src/settings/categories/externalLyric.ts | externalLyric 分类拆分并保留 Windows 条件 section |
| src/settings/categories/hotkeys.ts | hotkeys 分类拆分落地 |
| src/settings/categories/services.ts | services 分类拆分落地 |
| src/settings/categories/plugins.ts | plugins 分类拆分落地 |
| src/layouts/MainLayout.vue | 主容器改用 bg-app,并调整播放栏结构与浮动布局玻璃样式 |
| src/layouts/components/NavHeader.vue | 顶部菜单在图片风格下禁用主题切换入口 |
| src/i18n/locales/zh-CN.json | 新增外观风格与背景参数文案,并调整主题色来源措辞 |
| src/i18n/locales/en-US.json | 同步新增外观风格与背景参数文案,并调整主题色来源措辞 |
| src/components/Versions.vue | 删除版本展示组件 |
| src/components/ui/SVirtualList.vue | 调整空态/头部 slot 布局与滚动视口高度测量方式 |
| src/components/ui/SSelect.vue | 表单底色改用 bg-field 并用 ring 替代 shadow 表达 focus |
| src/components/ui/SMenu.vue | 调整非选中项文字色 |
| src/components/ui/SCombobox.vue | 表单底色改用 bg-field 并用 ring 替代 shadow 表达 open 状态 |
| src/components/settings/SettingsItem.vue | 支持 hideChildren:子项在不激活时可完全不渲染 |
| src/components/settings/custom/HotkeyConfig.vue | 结构微调并用 SDivider 分隔行 |
| src/components/settings/custom/FontConfig.vue | 用 SCard 替换手写卡片容器样式 |
| src/components/settings/custom/BackgroundImagePicker.vue | 新增背景图片选择/预览/清除的自定义设置组件 |
| src/components/player/Lyrics/engine/index.ts | 修复/增强渲染器复用清理、冻结/恢复动画同步、deltaTime 夹紧等逻辑 |
| src/components/list/SongList.vue | 浮动播放栏存在时调整“滚动到播放中”按钮 bottom 偏移 |
| src/components/AppBackground.vue | 新增全局背景渲染层(图片 + blur/scale + dim overlay) |
| src/App.vue | 注入 AppBackground 到应用根部 |
| electron/preload/index.ts | 新增 window.api.theme(选图、清理背景缓存) |
| electron/preload/index.d.ts | 补充 window.api.theme 类型声明 |
| electron/main/ipc/theme.ts | 新增主进程 IPC:选图并复制到缓存目录,支持清空背景缓存 |
| electron/main/ipc/index.ts | 注册 theme IPC handlers |
| components.d.ts | 组件类型声明更新(AppBackground、BackgroundImagePicker) |
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.