fix(前端): 代理IP共用弹窗改为精简口语文案

This commit is contained in:
2026-10-25 00:46:29 +08:00
parent 445a7dfbd5
commit 813bed66a3
3 changed files with 18 additions and 1 deletions
@@ -20,6 +20,7 @@ import { AUTH_TOKEN_KEY } from '@/shared/auth/session-keys'
import {
COST_GUARD_POLL_MS,
pausedPromptKey,
proxySharedToastText,
sharedWarningKey,
usageLine,
} from '@/shared/utils/cost-guard-alert'
@@ -68,7 +69,7 @@ function notifySharedWarnings(warnings: SharedSecretWarning[]): void {
const key = sharedWarningKey(warning)
if (warnedSharedKeys.has(key)) continue
warnedSharedKeys.add(key)
ElMessage.warning({ message: warning.message, duration: 8000, showClose: true })
ElMessage.warning({ message: proxySharedToastText(warning), duration: 8000, showClose: true })
}
}
@@ -27,3 +27,8 @@ export function pausedPromptKey(status: CostGuardStatus | null): string {
export function sharedWarningKey(warning: SharedSecretWarning): string {
return `${warning.type}|${warning.moduleLabel}|${warning.accounts}`
}
/** 代理 IP 共用弹窗文案:精简口语版,不搬运后端的技术口径。 */
export function proxySharedToastText(warning: SharedSecretWarning): string {
return `这把代理链接被 ${warning.accounts} 个账号共用,别人用多了你就不够用了。建议在「密钥设置」里配一把自己的。`
}