feat(api-key): 增加 API Key 上次使用时间并补齐测试
This commit is contained in:
@@ -478,6 +478,7 @@ export default {
|
||||
today: 'Today',
|
||||
total: 'Total',
|
||||
quota: 'Quota',
|
||||
lastUsedAt: 'Last Used',
|
||||
useKey: 'Use Key',
|
||||
useKeyModal: {
|
||||
title: 'Use API Key',
|
||||
|
||||
@@ -479,6 +479,7 @@ export default {
|
||||
today: '今日',
|
||||
total: '累计',
|
||||
quota: '额度',
|
||||
lastUsedAt: '上次使用时间',
|
||||
useKey: '使用密钥',
|
||||
useKeyModal: {
|
||||
title: '使用 API 密钥',
|
||||
|
||||
@@ -159,6 +159,13 @@
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template #cell-last_used_at="{ value }">
|
||||
<span v-if="value" class="text-sm text-gray-500 dark:text-dark-400">
|
||||
{{ formatDateTime(value) }}
|
||||
</span>
|
||||
<span v-else class="text-sm text-gray-400 dark:text-dark-500">-</span>
|
||||
</template>
|
||||
|
||||
<template #cell-created_at="{ value }">
|
||||
<span class="text-sm text-gray-500 dark:text-dark-400">{{ formatDateTime(value) }}</span>
|
||||
</template>
|
||||
@@ -738,6 +745,7 @@ const columns = computed<Column[]>(() => [
|
||||
{ key: 'usage', label: t('keys.usage'), sortable: false },
|
||||
{ key: 'expires_at', label: t('keys.expiresAt'), sortable: true },
|
||||
{ key: 'status', label: t('common.status'), sortable: true },
|
||||
{ key: 'last_used_at', label: t('keys.lastUsedAt'), sortable: true },
|
||||
{ key: 'created_at', label: t('keys.created'), sortable: true },
|
||||
{ key: 'actions', label: t('common.actions'), sortable: false }
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user