feat: |UI| show local datetime string and add useUTCDate option (#483)

This commit is contained in:
Dream Hunter
2024-11-15 00:04:17 +08:00
committed by GitHub
parent 3c81e05a2f
commit c102004f4d
7 changed files with 38 additions and 13 deletions
+3 -2
View File
@@ -5,8 +5,9 @@ import { useGlobalState } from '../../store'
import { api } from '../../api'
import { onMounted, watch } from 'vue';
import { processItem } from '../../utils/email-parser'
import { utcToLocalDate } from '../../utils';
const { telegramApp, loading } = useGlobalState()
const { telegramApp, loading, useUTCDate } = useGlobalState()
const route = useRoute()
const curMail = ref({});
@@ -50,7 +51,7 @@ onMounted(async () => {
ID: {{ curMail.id }}
</n-tag>
<n-tag type="info">
Date: {{ curMail.created_at }}
Date: {{ utcToLocalDate(curMail.created_at, useUTCDate) }}
</n-tag>
<n-tag type="info">
FROM: {{ curMail.source }}