Conversation
- 在所有平台的账号切换命令中调用 touch_last_used - 新增 AccountLastUsed 组件,替换卡片和表格中的创建时间展示 - 切换成功后刷新账号列表以更新最后使用时间 - 补充中英文文案
- 仅在真正切换账号时更新 last_used,移除登录/刷新时的误写 - 新增 get_local_timezone 命令,绕开 WebView 时区回退 UTC 问题 - 未切换过的账号显示为“—”,并将文案从“最后切换”改为“切换时间
将「显示切换时间/刷新时间」两个开关改为单一时间显示模式,账号卡片和列表的时间区域支持下拉切换切换时间与刷新时间,并新增单卡片临时覆盖能力。
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.
目标
让账号卡片上的时间真正表示“上次切换到该账号的时间”,并修复时间显示的时区偏移。
背景与意图
上游的时间展示有两处失真:
last_used在导入/更新(apply_payload)和配额刷新时都会被写成当前时间——卡片上显示的其实是“最近刷新/导入时间”,不是切号时间。本分支逐一修正:
last_used只在真实切号动作时记录;时区由 Rust 侧读取 OS 真实偏移。实现要点
touch_last_used(),在inject_*_account(切号)命令中调用;删除导入/刷新路径上的last_used误写(cursor、grok、trae 等)。qoder 扫描合并时保留已有真实切号时间,仅全新导入回退为当前时间get_local_timezone命令(chrono::Local读 OS 偏移),localTimeZone.ts启动时缓存,格式化按UTC + offset渲染,绕开 WebView 时区库AccountLastUsed渲染各账号卡片时间区,下拉可在“切换时间 / 刷新时间”间切换;两者皆无时回退“从未切换”(CodeBuddy 系有刷新时间,其它平台该项禁用)useUiConfigStore(localStorage),全局默认模式在设置页“时间显示”中选择;单卡片临时覆盖不持久化,切回全局模式自动清除用户可见
规模
4 提交 · 48 文件 · +478/−47,覆盖 10 个平台账号模块与对应账号页;locale 中英新增文案,无既有 key 改写。