test/custom-admin-ui #1
@@ -114,6 +114,7 @@ export interface AnalyticsFileRow {
|
||||
upload_count?: number
|
||||
upload_traffic?: number | string
|
||||
current: boolean
|
||||
expired?: boolean
|
||||
deleted?: boolean
|
||||
created_at?: string
|
||||
uploaded_at?: string
|
||||
|
||||
@@ -703,7 +703,7 @@
|
||||
{{ formatHistoryBytes(file.download_traffic) }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-sm" :class="[mutedTextClass]">
|
||||
{{ file.deleted ? '已删除' : file.current ? '现存' : '历史' }}
|
||||
{{ getHistoryStatusLabel(file) }}
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
@@ -1613,6 +1613,12 @@ const handleHistoryPageSizeChange = (size: number) => {
|
||||
const formatHistoryBytes = (value: number | string | undefined) =>
|
||||
formatFileSize(Number(value || 0), 1)
|
||||
const formatHistoryDate = (value?: string) => (value ? formatTimestamp(value) : '-')
|
||||
const getHistoryStatusLabel = (file: AnalyticsFileRow) => {
|
||||
if (file.deleted) return '已删除'
|
||||
if (file.expired) return '已过期'
|
||||
if (file.current) return '现存'
|
||||
return '历史'
|
||||
}
|
||||
|
||||
const primaryTextClass = computed(() => (isDarkMode.value ? 'text-white' : 'text-gray-900'))
|
||||
const mutedTextClass = computed(() => (isDarkMode.value ? 'text-gray-400' : 'text-gray-500'))
|
||||
|
||||
Reference in New Issue
Block a user