mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 01:10:23 +08:00
fix: correct API key expiry and dashboard savings (#361)
This commit is contained in:
@@ -161,8 +161,8 @@ export interface ApiKey {
|
||||
key_display: string
|
||||
is_active: boolean
|
||||
is_locked: boolean // 管理员锁定标志
|
||||
last_used_at?: string
|
||||
created_at: string
|
||||
last_used_at?: string | null
|
||||
created_at?: string | null
|
||||
total_requests?: number
|
||||
total_cost_usd?: number
|
||||
rate_limit?: number | null
|
||||
|
||||
@@ -756,8 +756,10 @@ function formatConcurrentLimitSimple(concurrentLimit?: number | null): string {
|
||||
return `${concurrentLimit} 并发`
|
||||
}
|
||||
|
||||
function formatDate(dateString: string): string {
|
||||
function formatDate(dateString?: string | null): string {
|
||||
if (!dateString) return '未知'
|
||||
const date = new Date(dateString)
|
||||
if (Number.isNaN(date.getTime())) return '未知'
|
||||
return date.toLocaleDateString('zh-CN', {
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
@@ -767,6 +769,7 @@ function formatDate(dateString: string): string {
|
||||
|
||||
function formatRelativeTime(dateString: string): string {
|
||||
const date = new Date(dateString)
|
||||
if (Number.isNaN(date.getTime())) return '未知'
|
||||
const now = new Date()
|
||||
const diffMs = now.getTime() - date.getTime()
|
||||
const diffMins = Math.floor(diffMs / (1000 * 60))
|
||||
|
||||
Reference in New Issue
Block a user