mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 01:40:21 +08:00
Unify quota snapshots and oauth refresh handling
This commit is contained in:
@@ -148,7 +148,7 @@
|
||||
</div>
|
||||
<div class="flex items-center gap-1.5 mt-0.5 text-[11px] text-muted-foreground flex-wrap">
|
||||
<span :class="key.is_active ? '' : 'text-destructive'">{{ key.is_active ? '启用' : '禁用' }}</span>
|
||||
<span v-if="key.account_quota">{{ shortenQuota(key.account_quota) }}</span>
|
||||
<span v-if="getQuotaText(key)">{{ shortenQuota(getQuotaText(key) || '') }}</span>
|
||||
<span v-if="key.proxy?.node_id">独立代理</span>
|
||||
<span
|
||||
v-if="key.last_used_at"
|
||||
@@ -300,6 +300,7 @@ import {
|
||||
getOAuthStatusDisplay,
|
||||
getOAuthStatusTitle,
|
||||
} from '@/utils/providerKeyStatus'
|
||||
import { getQuotaDisplayText } from '@/utils/providerKeyQuota'
|
||||
|
||||
type QuickSelectorValue =
|
||||
| 'banned'
|
||||
@@ -488,6 +489,10 @@ function formatRelativeTime(value: string): string {
|
||||
return `${Math.floor(diff / 86_400_000)}天前`
|
||||
}
|
||||
|
||||
function getQuotaText(key: PoolKeyDetail): string | null {
|
||||
return getQuotaDisplayText(key, props.providerType)
|
||||
}
|
||||
|
||||
function shortenQuota(raw: string): string {
|
||||
return raw.split('|').map((segment) => {
|
||||
let value = segment.trim()
|
||||
|
||||
Reference in New Issue
Block a user