fix: show publish time instead of creation time for post list (#676)

pull/677/head
Ryan Wang 2022-11-01 18:00:42 +08:00 committed by GitHub
parent 673947b2d0
commit 3d638fde37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 8 deletions

View File

@ -655,9 +655,7 @@ function handleSortItemChange(sortItem?: SortItem) {
<VEntityField>
<template #description>
<span class="truncate text-xs tabular-nums text-gray-500">
{{
formatDatetime(singlePage.page.metadata.creationTimestamp)
}}
{{ formatDatetime(singlePage.page.spec.publishTime) }}
</span>
</template>
</VEntityField>

View File

@ -403,7 +403,7 @@ onMounted(async () => {
<div
class="text-sm text-gray-500 group-hover:text-gray-900"
>
创建时间
发布时间
</div>
<div class="rounded bg-gray-200 p-0.5">
<IconCalendar
@ -413,9 +413,8 @@ onMounted(async () => {
</div>
<div class="text-base font-medium text-gray-900">
{{
formatDatetime(
formState.post.metadata.creationTimestamp
) || "未发布"
formatDatetime(formState.post.spec.publishTime) ||
"未发布"
}}
</div>
</div>

View File

@ -944,7 +944,7 @@ function handleContributorChange(user?: User) {
<VEntityField>
<template #description>
<span class="truncate text-xs tabular-nums text-gray-500">
{{ formatDatetime(post.post.metadata.creationTimestamp) }}
{{ formatDatetime(post.post.spec.publishTime) }}
</span>
</template>
</VEntityField>