feat: 商店上架素材 + 跨设备同步收尾 + UI/i18n 修复合并#258
Open
TNT-Likely wants to merge 3 commits intomainfrom
Open
Conversation
跨设备同步收尾(BeeCount Cloud V2):
- 同步漏推 / 错推一揽子修复
- BeeCount Cloud 版本号自动刷新
- 资产管理页货币符号跟随账户而非账本
- 编辑转账卡死(getTransferCategory 多条脏数据)自愈
- 清空未使用分类 / 标签的静默路径显式触发 sync(对齐 tags 行为)+ 诊断日志
死代码清理:
- 删除 CloudRepository 整组 + AppMode.cloud(从未真正使用)
商店上架素材 + UI/i18n 修复:
- 商店截图 / preview 视频上架素材
- Android 小组件 scaleType 改为 fitCenter 不再裁减内容
- 资产管理页总资产/总负债跟横线之间加 20px 间距
- 分类预算图标支持自定义图片(BudgetSection CategoryIcon)
- gitignore: 忽略本地 marketing/ 物料目录
README 重构:
- 主 README 瘦身,拆云配置教程到 docs/cloud-setup.md / docs/cloud-setup_EN.md
- 截图区切到 raw/{zh,en}/ 9 主题素材
- 去过时发现页 + 手动目录(GitHub 自带右上大纲)
- 顶部 Platform badge 加 Web(由 BeeCount Cloud 自带)
- 中英文 README 截图路径用对应 locale 素材
App 仅做登录验证(启用/管理在 Web 端): - BeeCountCloudAuthService 接入 2FA:_authenticate 检测 requires_2fa,silent 模式跳过弹窗(供后台 token recovery 用),用户主动登录走 _handleTwoFactorChallenge - TwoFactorChallengeRequest 带 verify callback,UI 在对话框内调用,失败拿 server 错误消息就地展示让用户重试(不闪退) - BeeCountCloudProvider.globalTwoFactorHandler 全局钩子,App 启动时注册 - getTwoFactorStatus(GET /auth/2fa/status):云同步页只读状态行用 UI: - lib/widgets/biz/login_2fa_challenge_view.dart:Login2FAChallengeDialog (showDialog 弹窗,non-dismissible,内联错误展示 + 重试,无废话提示无倒计时) - lib/main.dart:globalNavigatorKey + handler 注册,MaterialApp 挂 navigator key - beecount_cloud_sync_page:_TwoFactorStatusRow 加在账号 section 下方, 未登录 / 拉取失败自动隐藏,监听 syncStatusRefreshProvider 重新登录后自动刷新 - 三语 i18n 完整(zh / en / zh_TW)+ regenerated app_localizations*.dart token refresh 并发去重(关键修复): - 服务端用 rotating refresh token(每次 refresh 立刻 revoke 老 token);cold start 时 initialize() 与 UI 渲染会并发触发 refresh,两个 POST 用同一个老 refresh_token → 第一个成功旋转,第二个用已 revoke 的 token 拿到 401 → _clearSession 把刚保存 的新 session 又清掉 → 下次启动撞 silent recovery 又被 2FA 拦截 - tryRefreshSession 加 _refreshInFlight 去重,并发调用共享同一个 future, _refreshSessionOrClear 也走 dedup 路径 - silent recovery 失败后加 30 秒冷却(_silentRecoveryCooldownUntil),防止 UI rebuild 撞 server 30/min 限流让用户主动「重新登录」时反而 429 设计文档:BeeCount-Platform/.docs/2fa-design.md。
budgetRefreshProvider 触发 budgetOverviewProvider invalidate 后,原 AsyncValue.when 的 loading 分支返回 SizedBox.shrink → 进度条卸载 → 闪烁。 改用 valueOrNull 拿 Riverpod AsyncLoading 自带的 previous value,loading 期间继续渲染旧数据,新数据到达自然覆盖。
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.
合并 b4dfdc2 之后的 15 个 commit:
分类图标 byName 重构:
跨设备同步收尾:
商店上架素材:
UI/i18n 修复: