From 6b22e1fa3f2eb0fa9036957aeed8dc8c69f47110 Mon Sep 17 00:00:00 2001 From: seaislee1209 Date: Fri, 17 Apr 2026 19:07:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=94=A8=E6=88=B7=E7=AB=AF=E6=96=87?= =?UTF-8?q?=E6=A1=88=E4=BB=8E=E3=80=8C=E9=A2=9D=E5=BA=A6=E3=80=8D=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E5=85=B7=E4=BD=93=E5=8D=95=E4=BD=8D=E3=80=8C=E6=AC=A1?= =?UTF-8?q?=E6=95=B0=E3=80=8D=E2=80=94=20=E6=B6=88=E9=99=A4=E7=82=B9?= =?UTF-8?q?=E6=95=B0=E6=A6=82=E5=BF=B5=E6=B7=B7=E6=B7=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Sidebar 左下角:去钻石图标(避免用户带入即梦/豆包的"点数"概念)+ 数据从 daily_seconds (秒数池残留) 改为 daily_generation_limit (次数); 文案 "剩余额度"→"今日剩余次数"(必须写全,用户不猜); 数字字号放大 14→18,tabular-nums 稳定排版 - ProfilePage 预警 banner: "今日额度已使用 X%"→"今日生成次数已用 X%"; "今日额度已用完"→"今日生成次数已用完" - generation.ts 错误映射: "额度不足,请联系管理员"→ "今日生成次数或团队余额不足,请联系管理员"(两种可能都列出) 秒数池(daily_seconds_limit)是 v0.10.0 计费改次数+金额前的遗留概念, 这次把用户端可见的"额度"全部替换为明确的"生成次数/余额"单位,避免用户 把"额度"理解成即梦/豆包的"点数"来找客服问问题。 Co-Authored-By: Claude Opus 4.7 (1M context) --- web/src/components/Sidebar.module.css | 16 ++++++++-------- web/src/components/Sidebar.tsx | 17 ++++++++++------- web/src/pages/ProfilePage.tsx | 4 ++-- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/web/src/components/Sidebar.module.css b/web/src/components/Sidebar.module.css index 5cf0c88..b37a0f9 100644 --- a/web/src/components/Sidebar.module.css +++ b/web/src/components/Sidebar.module.css @@ -62,37 +62,37 @@ padding-bottom: 8px; } -/* Quota display */ +/* Quota display — 今日剩余生成次数(v0.10.0 起次数制) */ .quota { display: flex; flex-direction: column; align-items: center; - gap: 2px; + gap: 3px; cursor: pointer; padding: 8px 4px; border-radius: 8px; transition: background 0.15s; + min-width: 56px; } .quota:hover { background: rgba(255, 255, 255, 0.04); } -.diamondIcon { - flex-shrink: 0; -} - .quotaNumber { - font-size: 14px; + font-size: 18px; font-weight: 600; color: var(--color-text-primary); line-height: 1; + font-variant-numeric: tabular-nums; + letter-spacing: 0.5px; } .quotaLabel { - font-size: 9px; + font-size: 10px; color: var(--color-text-secondary); white-space: nowrap; + letter-spacing: 0.5px; } /* Admin button */ diff --git a/web/src/components/Sidebar.tsx b/web/src/components/Sidebar.tsx index 79805b0..2096876 100644 --- a/web/src/components/Sidebar.tsx +++ b/web/src/components/Sidebar.tsx @@ -12,8 +12,11 @@ export function Sidebar() { const isActive = (path: string) => location.pathname === path; const role = user?.role; + // 今日剩余生成次数(v0.10.0 起计费体系为次数+金额,不再是秒数池) const dailyRemaining = quota - ? (quota.daily_seconds_limit === -1 ? Infinity : Math.max(0, quota.daily_seconds_limit - quota.daily_seconds_used)) + ? (quota.daily_generation_limit === -1 + ? Infinity + : Math.max(0, quota.daily_generation_limit - quota.daily_generation_used)) : 0; return ( @@ -70,15 +73,15 @@ export function Sidebar() {
{/* Quota display - not for super admin */} {role !== 'super_admin' && ( -
navigate('/profile')}> - - - - +
navigate('/profile')} + title="今日剩余生成次数(实际扣费以火山 token 消耗为准)" + > {dailyRemaining === Infinity ? '∞' : dailyRemaining.toLocaleString()} - 剩余额度 + 今日剩余次数
)} diff --git a/web/src/pages/ProfilePage.tsx b/web/src/pages/ProfilePage.tsx index 260488c..59faab0 100644 --- a/web/src/pages/ProfilePage.tsx +++ b/web/src/pages/ProfilePage.tsx @@ -153,10 +153,10 @@ export function ProfilePage() { {/* Quota warning */} {dailyPercent >= 80 && dailyPercent < 100 && ( -
今日额度已使用 {dailyPercent.toFixed(0)}%,请合理使用
+
今日生成次数已用 {dailyPercent.toFixed(0)}%,请合理使用
)} {dailyPercent >= 100 && ( -
今日额度已用完,请明天再试
+
今日生成次数已用完,请明天再试
)} {/* Consumption Overview */}