feat(frontend): add time manager and unify date formats

This commit is contained in:
Tim
2025-07-09 18:48:06 +08:00
parent 9867ed91f4
commit 52ae87e4f4
6 changed files with 45 additions and 8 deletions

View File

@@ -181,6 +181,7 @@ import { useRoute } from 'vue-router'
import { API_BASE_URL } from '../main'
import BaseTimeline from '../components/BaseTimeline.vue'
import { stripMarkdown } from '../utils/markdown'
import TimeManager from '../utils/time'
import { hatch } from 'ldrs'
hatch.register()
@@ -200,7 +201,7 @@ export default {
const formatDate = (d) => {
if (!d) return ''
return new Date(d).toLocaleDateString('zh-CN', { year: 'numeric', month: 'numeric', day: 'numeric' })
return TimeManager.format(d)
}
const fetchData = async () => {