@@ -108,6 +108,14 @@ const statusTextMap: Record<string, string> = {
108108 disabled : "已停用" ,
109109} ;
110110
111+ const routingCooldownTextMap : Record < string , string > = {
112+ official_remaining_below_3pct : "路由冷却" ,
113+ usage_limited : "路由冷却" ,
114+ capacity_failed : "路由冷却" ,
115+ rate_limited : "路由冷却" ,
116+ routing_cooldown : "路由冷却" ,
117+ } ;
118+
111119const authModeTextMap : Record < string , string > = {
112120 api_key : "API Key" ,
113121 oauth : "官方授权" ,
@@ -513,6 +521,16 @@ function formatDeletedAccountMessage(
513521 : `已删除账户 ${ accountName } ` ;
514522}
515523
524+ function getRoutingCooldownSeconds ( record : AccountRecord ) : number | undefined {
525+ return (
526+ record . routing_cooldown_remaining_seconds ?? record . cooldown_remaining_seconds
527+ ) ;
528+ }
529+
530+ function getRoutingCooldownLabel ( record : AccountRecord ) : string {
531+ return routingCooldownTextMap [ record . routing_cooldown_reason ?? "" ] ?? "路由冷却" ;
532+ }
533+
516534function formatActiveAccountMessage (
517535 language : AppLanguage ,
518536 accountName : string ,
@@ -1408,6 +1426,9 @@ export function AccountsPage({
14081426 < Tag color = { statusColorMap [ record . status ] ?? "default" } >
14091427 { t ( statusTextMap [ record . status ] ?? record . status ) }
14101428 </ Tag >
1429+ { getRoutingCooldownSeconds ( record ) ? (
1430+ < Tag color = "gold" > { t ( getRoutingCooldownLabel ( record ) ) } </ Tag >
1431+ ) : null }
14111432 { record . is_active ? (
14121433 < Tag color = "green" > { t ( "当前使用中" ) } </ Tag >
14131434 ) : null }
@@ -1800,6 +1821,14 @@ export function AccountsPage({
18001821 detailAccount . status ,
18011822 ) }
18021823 </ Descriptions . Item >
1824+ < Descriptions . Item label = { t ( "路由状态" ) } >
1825+ { getRoutingCooldownSeconds ( detailAccount )
1826+ ? `${ t ( getRoutingCooldownLabel ( detailAccount ) ) } · ${ Math . max (
1827+ Math . floor ( ( getRoutingCooldownSeconds ( detailAccount ) ?? 0 ) / 60 ) ,
1828+ 0 ,
1829+ ) } m`
1830+ : t ( "正常" ) }
1831+ </ Descriptions . Item >
18031832 < Descriptions . Item label = { t ( "认证方式" ) } >
18041833 { t (
18051834 authModeTextMap [ detailAccount . auth_mode ] ??
0 commit comments