Skip to content

Conversation

@johnnyee
Copy link
Contributor

Summary

本 PR 包含多项状态栏 UI 增强功能:

1. 用量段:进度条状态色

  • 0-50%: 绿色(充足)
  • 50-80%: 黄色(注意)
  • 80%+: 红色(紧急)
  • 使用柔和色调,不刺眼

2. 订阅段:精简信息 + 语义化颜色

  • 格式精简:PLUS ¥198/月 53天(减少约40%字符)
  • 语义化颜色:
    • PLUS/PRO/MAX: 橙色(高级套餐)
    • PAYGO: 蓝色(按需套餐)
    • FREE: 灰色(免费套餐)
  • FREE 套餐优先排序

3. 用量段:加载状态可视化

  • API 失败时自动降级使用缓存数据
  • 完全无数据时显示"⏳ 获取中..."
  • API 成功后自动更新缓存(5分钟有效期)

Test plan

  • 本地编译通过
  • 状态色在不同用量百分比下显示正确
  • 订阅段颜色与套餐类型匹配
  • 网络异常时能降级显示缓存数据

🤖 Generated with Claude Code

johnnyee and others added 13 commits December 10, 2025 15:32
根据用量百分比动态显示不同颜色:
- 0-50%: 绿色(充足)
- 50-80%: 黄色(注意)
- 80%+: 红色(紧急)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
将高饱和度的亮色改为更柔和的色调:
- 绿色: #46 → #114 (柔和绿)
- 黄色: #226 → #179 (柔和黄/橙)
- 红色: #196 → #174 (柔和红/粉)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 红色: #174 → #167 (更红,不再偏粉)
- 删除三色演示调试代码

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1. 语义化颜色(固定颜色,不再随机):
   - PLUS/PRO/MAX: 橙色(高级套餐)
   - PAYGO: 蓝色(按需套餐)
   - FREE: 灰色(免费套餐)

2. 精简显示格式:
   - 旧: PLUS ¥198/月 可重置2次 53天
   - 新: PLUS ¥198/月 53d
   - 减少约40%字符,窄终端友好

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1. 天数单位 d → 天
2. 排序逻辑:FREE 优先,然后按剩余天数升序

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
已完成并移除:
- 用量段:状态色功能
- 订阅段:精简信息 + 语义化颜色

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1. API 失败时自动降级使用缓存数据
2. 完全无数据时显示"⏳ 获取中..."
3. API 成功后自动更新缓存

提升用户体验:网络异常时不再显示空白

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@zcg zcg merged commit 77d1f71 into byebye-code:main Dec 10, 2025
4 checks passed
@johnnyee johnnyee deleted the feature/status-color-progress-bar branch December 10, 2025 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants