fix: 用户端文案从「额度」改为具体单位「次数」— 消除点数概念混淆
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 4m5s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 4m5s
- 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) <noreply@anthropic.com>
This commit is contained in:
parent
39667ff19c
commit
6b22e1fa3f
@ -62,37 +62,37 @@
|
|||||||
padding-bottom: 8px;
|
padding-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Quota display */
|
/* Quota display — 今日剩余生成次数(v0.10.0 起次数制) */
|
||||||
.quota {
|
.quota {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 2px;
|
gap: 3px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 8px 4px;
|
padding: 8px 4px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
transition: background 0.15s;
|
transition: background 0.15s;
|
||||||
|
min-width: 56px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.quota:hover {
|
.quota:hover {
|
||||||
background: rgba(255, 255, 255, 0.04);
|
background: rgba(255, 255, 255, 0.04);
|
||||||
}
|
}
|
||||||
|
|
||||||
.diamondIcon {
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.quotaNumber {
|
.quotaNumber {
|
||||||
font-size: 14px;
|
font-size: 18px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--color-text-primary);
|
color: var(--color-text-primary);
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.quotaLabel {
|
.quotaLabel {
|
||||||
font-size: 9px;
|
font-size: 10px;
|
||||||
color: var(--color-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Admin button */
|
/* Admin button */
|
||||||
|
|||||||
@ -12,8 +12,11 @@ export function Sidebar() {
|
|||||||
const isActive = (path: string) => location.pathname === path;
|
const isActive = (path: string) => location.pathname === path;
|
||||||
const role = user?.role;
|
const role = user?.role;
|
||||||
|
|
||||||
|
// 今日剩余生成次数(v0.10.0 起计费体系为次数+金额,不再是秒数池)
|
||||||
const dailyRemaining = quota
|
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;
|
: 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -70,15 +73,15 @@ export function Sidebar() {
|
|||||||
<div className={styles.bottom}>
|
<div className={styles.bottom}>
|
||||||
{/* Quota display - not for super admin */}
|
{/* Quota display - not for super admin */}
|
||||||
{role !== 'super_admin' && (
|
{role !== 'super_admin' && (
|
||||||
<div className={styles.quota} onClick={() => navigate('/profile')}>
|
<div
|
||||||
<svg className={styles.diamondIcon} width="16" height="16" viewBox="0 0 24 24" fill="none">
|
className={styles.quota}
|
||||||
<path d="M6 3h12l4 8-10 12L2 11l4-8z" fill="#6c63ff" opacity="0.85" />
|
onClick={() => navigate('/profile')}
|
||||||
<path d="M2 11h20M6 3l4 8M18 3l-4 8M12 23l-4-12M12 23l4-12" stroke="#fff" strokeWidth="0.8" opacity="0.4" />
|
title="今日剩余生成次数(实际扣费以火山 token 消耗为准)"
|
||||||
</svg>
|
>
|
||||||
<span className={styles.quotaNumber}>
|
<span className={styles.quotaNumber}>
|
||||||
{dailyRemaining === Infinity ? '∞' : dailyRemaining.toLocaleString()}
|
{dailyRemaining === Infinity ? '∞' : dailyRemaining.toLocaleString()}
|
||||||
</span>
|
</span>
|
||||||
<span className={styles.quotaLabel}>剩余额度</span>
|
<span className={styles.quotaLabel}>今日剩余次数</span>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
@ -153,10 +153,10 @@ export function ProfilePage() {
|
|||||||
|
|
||||||
{/* Quota warning */}
|
{/* Quota warning */}
|
||||||
{dailyPercent >= 80 && dailyPercent < 100 && (
|
{dailyPercent >= 80 && dailyPercent < 100 && (
|
||||||
<div className={styles.warningBanner}>今日额度已使用 {dailyPercent.toFixed(0)}%,请合理使用</div>
|
<div className={styles.warningBanner}>今日生成次数已用 {dailyPercent.toFixed(0)}%,请合理使用</div>
|
||||||
)}
|
)}
|
||||||
{dailyPercent >= 100 && (
|
{dailyPercent >= 100 && (
|
||||||
<div className={styles.dangerBanner}>今日额度已用完,请明天再试</div>
|
<div className={styles.dangerBanner}>今日生成次数已用完,请明天再试</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Consumption Overview */}
|
{/* Consumption Overview */}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user