[fix] use i18n utility for dates

This commit is contained in:
Arjan Singh
2025-09-17 12:31:32 -07:00
parent 15762acb45
commit 4820d87d86
2 changed files with 3 additions and 3 deletions

View File

@@ -71,7 +71,7 @@ export const i18n = createI18n({
})
/** Convenience shorthand: i18n.global */
export const { t, te } = i18n.global
export const { t, te, d } = i18n.global
/**
* Safe translation function that returns the fallback message if the key is not found.

View File

@@ -1,6 +1,6 @@
import { computed, ref } from 'vue'
import { t } from '@/i18n'
import { d, t } from '@/i18n'
import type { UUID } from '@/lib/litegraph/src/utils/uuid'
import type { AssetItem } from '@/platform/assets/schemas/assetSchema'
import {
@@ -69,7 +69,7 @@ export function useAssetBrowser(assets: AssetItem[] = []) {
// Create display stats from API data
const stats = {
formattedDate: new Date(asset.created_at).toLocaleDateString(),
formattedDate: d(new Date(asset.created_at), { dateStyle: 'short' }),
downloadCount: undefined, // Not available in API
stars: undefined // Not available in API
}