App:多配色主题系统 + 本地主密码锁 - #4
Merged
Merged
Conversation
主题系统: - 新增 palette.dart,内置 4 套 Catppuccin 配色(Mocha/Macchiato/Frappe/Latte) - AppColors 由 const 改为可变字段,applyPalette 运行时切换,453 处调用点零改动 - 删除 230 处与 AppColors 绑定的 const(编译要求),不含 AppColors 的 const 保留 - 设置中心新增「外观」页:配色卡片网格 + 迷你预览,点击即时切换并持久化 - settings 增 themeId,main 监听 themeId 重建 MaterialApp 主密码锁: - 新增 lock_store.dart:加盐 10w 轮 SHA-256 哈希存 lock.json(权限600),不存明文 - 新增 lock_screen.dart 解锁界面,main 启动门禁(未设密码则直接进) - 设置中心新增「安全」页:设置/修改/取消主密码 验证:flutter analyze 0 问题,51 个测试全过,macOS 编译运行正常 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CI 的 flutter analyze 把 unused_import warning 当失败。 AppLang 来自 i18n.dart,settings_store 确实多余。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- 终端 _termTheme 由冻结全局改为 getter,随当前主题实时重算 - 终端硬编码黑/品红改走主题色(surface1/pink/mauve) - 新增 2 套彩色主题:霓虹夜(Tokyo Night风) / 樱桃亮(高对比亮色) - palette name 拆为 nameZh/nameEn,外观页卡片名随语言切换 - app_shell 标签(主机/终端/智能体/面板)改用 i18n,语言切换重建布局 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- 严重bug:面板(终端/智能体等)被关掉后无任何恢复入口,只能重启。 新增「重置布局」顶栏按钮,一键恢复所有面板到默认布局。 用 layoutResetProvider 信号解耦,AppShell 监听后重建 layout。 - 给 4 个面板设 minimalSize(200~240px),拖拽分隔条到下限即停, 从根上杜绝「拖到过窄→内容溢出」的 RIGHT OVERFLOWED 警告。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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.
概述
为 Flutter 桌面端新增两项基础能力:可切换的多配色主题系统,以及本地主密码锁。
主题系统
palette.dart,内置 4 套 Catppuccin 配色:Mocha(深暗)/ Macchiato(暖暗)/ Frappé(柔暗)/ Latte(亮色)AppColors从static const改为可变字段 +applyPalette()运行时切换——453 处调用点零改动,仅删除 230 处编译要求的 const(不含 AppColors 的 const 完整保留)settings.json增themeId,启动按持久化值应用,main监听 themeId 重建 MaterialApp主密码锁
lock_store.dart:加盐 + 10 万轮 SHA-256 哈希存lock.json(权限 600),不存明文、不存可逆密文lock_screen.dart解锁界面,main启动门禁(未设密码则直接进入,不强制)测试
flutter analyze0 问题🤖 Generated with Claude Code