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> <VEntityField>
<template #description> <template #description>
<span class="truncate text-xs tabular-nums text-gray-500"> <span class="truncate text-xs tabular-nums text-gray-500">
{{ {{ formatDatetime(singlePage.page.spec.publishTime) }}
formatDatetime(singlePage.page.metadata.creationTimestamp)
}}
</span> </span>
</template> </template>
</VEntityField> </VEntityField>

View File

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

View File

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