Conversation
- 在 index.html 添加内联主题脚本,实现页面加载前的主题应用 - 新增 getCachedThemeSetting 和 writeThemeSettingCache 函数 - 在 App.tsx 多处调用缓存写入,确保主题偏好持久化 - 修复 TerminalManager 中 ResizeObserver 的清理逻辑 问题: - 用户在刷新页面或首次加载时,可能看到短暂的白色/黑色闪烁 - 主题设置未在 localStorage 中缓存,每次需要重新推断 改进: - 通过内联脚本在 HTML 解析阶段即读取缓存并应用主题 - 添加主题缓存读写工具函数,确保用户偏好在会话间保持 - 增强 ResizeObserver 断开连接的防御性检查 Signed-off-by: Lulu <58587930+lulu-sk@users.noreply.github.com>
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.
问题:
改进: