fix(client): use app locale for note header date
This commit is contained in:
parent
ed9eeb0628
commit
1d7455c3e9
1 changed files with 2 additions and 1 deletions
|
@ -80,6 +80,7 @@ import { definePageMetadata } from "@/scripts/page-metadata";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { defaultStore } from "@/store";
|
import { defaultStore } from "@/store";
|
||||||
import icon from "@/scripts/icon";
|
import icon from "@/scripts/icon";
|
||||||
|
import { dateTimeFormat } from "@/scripts/intl-const";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
noteId: string;
|
noteId: string;
|
||||||
|
@ -177,7 +178,7 @@ definePageMetadata(
|
||||||
title: i18n.t("noteOf", {
|
title: i18n.t("noteOf", {
|
||||||
user: appearNote.value.user.name || appearNote.value.user.username,
|
user: appearNote.value.user.name || appearNote.value.user.username,
|
||||||
}),
|
}),
|
||||||
subtitle: new Date(appearNote.value.createdAt).toLocaleString(),
|
subtitle: dateTimeFormat.format(new Date(appearNote.value.createdAt)),
|
||||||
avatar: appearNote.value.user,
|
avatar: appearNote.value.user,
|
||||||
path: `/notes/${appearNote.value.id}`,
|
path: `/notes/${appearNote.value.id}`,
|
||||||
share: {
|
share: {
|
||||||
|
|
Loading…
Reference in a new issue