Repository navigation
feat(settings): 音视频固定暗色背景开关与跟随档 - #1978
Merged
Merged
Conversation
|
🔔 change-close-pending:change change-workflow 会话启动时将自动执行 G4 收尾(sync → validate --strict → archive → 看板 Done → 关闭 spec issue)。无需人工提醒。 |
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.
变更概述
设置 → 外观 → 主题 新增「音视频固定暗色背景」开关,默认勾选。勾选时播放器固定暗色;取消后跟随应用主题。切换即时热应用并写入配置,重启后保持。
关联 Issue
Closes #1975
变更内容
SettingsView外观区新增开关(data-testid="media-theme-dark"):勾选写mediaTheme: "dark",取消写"follow",调用setConfig+saveAppConfig。e2e/media-theme-switch.spec.ts:默认勾选、取消即变浅、重新勾选恢复暗色、深色应用主题下两档一致、刷新后状态与档位保持。tasks.md勾选 1.2。影响范围
验证方式
npx tsc --noEmit:通过npx eslint src/:0 error(存量 warning 保持)npm test:202 files / 2505 tests 全通过npx playwright test e2e/media-theme-switch.spec.ts:3 passednpx playwright test e2e/settings-content.spec.ts e2e/settings-scene.spec.ts:9 passed开关行为证据(真实浏览器计算样式):
rgb(19,19,22)暗色rgb(247,247,246)浅色rgb(19,19,22)暗色rgb(247,247,246)浅色rgb(19,19,22)暗色QG-5 证据:
.artifacts/1975/state-coverage.json4 态(settings-switch-default / switch-off-player-light / switch-on-player-dark / restart-persisted-light),截图与断言均 passed。质量门禁引用
e2e/media-theme-switch.spec.ts3 条用例,覆盖默认/热切换/重启保持;另跑设置相关 9 条回归。Meta+,打开、点击复选框、Esc 关闭、page.reload()),读真实计算样式。风险评估
风险等级: medium
来源: ai-generated
新增用户可见控件,行为跨设置面板与播放器两层;但落点小、可逆(改回勾选即恢复暗色)。
回滚方案
git revert <merge-commit>;或用户在设置中重新勾选「音视频固定暗色背景」。