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 */}