mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 00:53:33 +00:00
Fix:前端显示临时异常状态
This commit is contained in:
@@ -376,9 +376,11 @@
|
||||
? 'bg-orange-100 text-orange-800'
|
||||
: account.status === 'unauthorized'
|
||||
? 'bg-red-100 text-red-800'
|
||||
: account.isActive
|
||||
? 'bg-green-100 text-green-800'
|
||||
: 'bg-red-100 text-red-800'
|
||||
: account.status === 'temp_error'
|
||||
? 'bg-orange-100 text-orange-800'
|
||||
: account.isActive
|
||||
? 'bg-green-100 text-green-800'
|
||||
: 'bg-red-100 text-red-800'
|
||||
]"
|
||||
>
|
||||
<div
|
||||
@@ -388,9 +390,11 @@
|
||||
? 'bg-orange-500'
|
||||
: account.status === 'unauthorized'
|
||||
? 'bg-red-500'
|
||||
: account.isActive
|
||||
? 'bg-green-500'
|
||||
: 'bg-red-500'
|
||||
: account.status === 'temp_error'
|
||||
? 'bg-orange-500'
|
||||
: account.isActive
|
||||
? 'bg-green-500'
|
||||
: 'bg-red-500'
|
||||
]"
|
||||
/>
|
||||
{{
|
||||
@@ -398,9 +402,11 @@
|
||||
? '已封锁'
|
||||
: account.status === 'unauthorized'
|
||||
? '异常'
|
||||
: account.isActive
|
||||
? '正常'
|
||||
: '异常'
|
||||
: account.status === 'temp_error'
|
||||
? '临时异常'
|
||||
: account.isActive
|
||||
? '正常'
|
||||
: '异常'
|
||||
}}
|
||||
</span>
|
||||
<span
|
||||
@@ -1630,6 +1636,9 @@ const getSchedulableReason = (account) => {
|
||||
if (account.status === 'unauthorized') {
|
||||
return '认证失败(401错误)'
|
||||
}
|
||||
if (account.status === 'temp_error' && account.errorMessage) {
|
||||
return account.errorMessage
|
||||
}
|
||||
if (account.status === 'error' && account.errorMessage) {
|
||||
return account.errorMessage
|
||||
}
|
||||
@@ -1668,6 +1677,8 @@ const getAccountStatusText = (account) => {
|
||||
account.rateLimitStatus === 'limited'
|
||||
)
|
||||
return '限流中'
|
||||
// 检查是否临时错误
|
||||
if (account.status === 'temp_error') return '临时异常'
|
||||
// 检查是否错误
|
||||
if (account.status === 'error' || !account.isActive) return '错误'
|
||||
// 检查是否可调度
|
||||
@@ -1692,6 +1703,9 @@ const getAccountStatusClass = (account) => {
|
||||
) {
|
||||
return 'bg-orange-100 text-orange-800'
|
||||
}
|
||||
if (account.status === 'temp_error') {
|
||||
return 'bg-orange-100 text-orange-800'
|
||||
}
|
||||
if (account.status === 'error' || !account.isActive) {
|
||||
return 'bg-red-100 text-red-800'
|
||||
}
|
||||
@@ -1717,6 +1731,9 @@ const getAccountStatusDotClass = (account) => {
|
||||
) {
|
||||
return 'bg-orange-500'
|
||||
}
|
||||
if (account.status === 'temp_error') {
|
||||
return 'bg-orange-500'
|
||||
}
|
||||
if (account.status === 'error' || !account.isActive) {
|
||||
return 'bg-red-500'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user