Repository navigation
feat: 设置页统计仪表盘、折叠态信息条与主题实时同步 - #68
Merged
Merged
Conversation
设置面板引入 recharts 可视化统计:近 7 天趋势面积图与翻译源分布条形 图,悬浮显示日期、次数、字符量与周占比。后端 get_stats 相应扩展 last_24h 与 daily_7d,日界按本地时区计算(新增 time crate 的 local-offset 特性,已在依赖树中)。 设置页顶部改为单行紧凑表头,指标卡改为五列网格,默认窗口放大到 640×560,首屏即可完整呈现仪表盘。新增脏状态标记、Ctrl+S 保存与 Tab 切换淡入。 主题切换改为选中即持久化并广播,不再等待保存按钮;useTheme 与浮窗 各加 2 秒轮询兜底,覆盖 WebView2 上 prefers-color-scheme 变更事件 不可靠的情况。 浮窗折叠态重构为一体化信息条:状态点、译文摘要、语言方向填满 44px 高度,替代原先被裁切的展开态。红绿灯字形互换按语义键重挂载 以播放淡入动画,内容区随宽度档位重挂载淡入,掩住窗口改宽时的文本 重排跳变。同步提升译文与固定文案的字号、字重与对比度。 开发服务器固定绑定 IPv4:Node ≥17 将 localhost 解析到 ::1,Vite 只绑 IPv6 而 tauri CLI 探测 127.0.0.1,导致启动超时失败。
Merged
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.
概要
本轮围绕设置面板的可视化与浮窗折叠态做体验补齐,并修掉了主题跨窗口不同步与开发服务器启动失败两个问题。
统计仪表盘
get_stats新增last_24h与daily_7d,日界按本地时区计算(新增timecrate 的local-offset特性)设置面板布局与交互
Ctrl+S保存、Tab 切换淡入主题实时同步
useTheme与浮窗各加 2 秒轮询兜底,覆盖 WebView2 上prefers-color-scheme变更事件不可靠的情况浮窗折叠态
开发环境
127.0.0.1:Node ≥17 将localhost解析到::1,Vite 只绑 IPv6 而 tauri CLI 探测 IPv4,导致npm run tauri dev180s 超时失败验证
npx tsc --noEmit通过npx vitest run4 个文件 / 25 个用例通过cargo fmt --check通过cargo clippy -- -D warnings通过(CI 同款参数)cargo test --lib231 个用例通过已知限制
macOS 的
NSVisualEffectView材质渲染无法在 Windows 上验证,需在 Mac 上人工确认;CI 的 macOS runner 仅验证编译通过。