Skip to content

feat: 允许没有背景#4

Open
ShadowLemoon wants to merge 2 commits into
masterfrom
feat/no-background
Open

feat: 允许没有背景#4
ShadowLemoon wants to merge 2 commits into
masterfrom
feat/no-background

Conversation

@ShadowLemoon
Copy link
Copy Markdown
Owner

No description provided.

@ShadowLemoon
Copy link
Copy Markdown
Owner Author

Copy link
Copy Markdown

Copilot AI commented May 27, 2026

@copilot 解决一下https://github.com/AlkaidLab/foundation-sunshine/pull/636这里review里的问题

已修复两个 review 问题 (commit fix: add localStorage error handling and cleanup for event listeners):

  1. LogsSection.vue: 为 dev mode 的 localStorage 读写添加了 readDevMode() / writeDevMode() 封装,使用 try-catch 防止受限环境下崩溃。
  2. useBackground.js: 使用 onScopeDispose 清理 MutationObserver 和 sunshine-background-bypass 事件监听器,防止内存泄漏。

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 44b710bb17

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +207 to +209
if (isDevMode()) {
document.body.style.background = ''
return
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reset text colors when bypassing the background

When no-background mode is enabled after a local custom background was used, this path clears only the inline image and returns before resetting the text CSS variables/body bg-light/bg-dark class that setTextColorTheme previously installed. The page then renders the plain fallback body background with colors chosen for the hidden old image (theme changes also re-run brightness checks against that hidden image), so titles/subtitles can have the wrong contrast until a background is selected or cleared. Reset the text theme when bypassing the image.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants