diff --git a/package.json b/package.json
index a1c198bb9..af65dbc8e 100644
--- a/package.json
+++ b/package.json
@@ -32,7 +32,7 @@
"@formkit/themes": "^1.0.0-beta.12",
"@formkit/utils": "^1.0.0-beta.12",
"@formkit/vue": "^1.0.0-beta.12",
- "@halo-dev/api-client": "^0.0.53",
+ "@halo-dev/api-client": "^0.0.55",
"@halo-dev/components": "workspace:*",
"@halo-dev/console-shared": "workspace:*",
"@halo-dev/richtext-editor": "^0.0.0-alpha.16",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index fc18ebd2b..d60144b23 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -12,7 +12,7 @@ importers:
'@formkit/themes': ^1.0.0-beta.12
'@formkit/utils': ^1.0.0-beta.12
'@formkit/vue': ^1.0.0-beta.12
- '@halo-dev/api-client': ^0.0.53
+ '@halo-dev/api-client': ^0.0.55
'@halo-dev/components': workspace:*
'@halo-dev/console-shared': workspace:*
'@halo-dev/richtext-editor': ^0.0.0-alpha.16
@@ -104,7 +104,7 @@ importers:
'@formkit/themes': 1.0.0-beta.12-e579559_tailwindcss@3.2.4
'@formkit/utils': 1.0.0-beta.12-e579559
'@formkit/vue': 1.0.0-beta.12-e579559_ior6jr3fpijijuwpr34w2i25va
- '@halo-dev/api-client': 0.0.53
+ '@halo-dev/api-client': 0.0.55
'@halo-dev/components': link:packages/components
'@halo-dev/console-shared': link:packages/shared
'@halo-dev/richtext-editor': 0.0.0-alpha.16_vue@3.2.45
@@ -1962,8 +1962,8 @@ packages:
- windicss
dev: false
- /@halo-dev/api-client/0.0.53:
- resolution: {integrity: sha512-B3njjXFqTi28FfDhZ9VAVlv6mMQxLgIsBUqTPmMQF/IxWWtfN6cxYi7is+zmw+chFFe38UVaEAPSHORLMxnJ6A==}
+ /@halo-dev/api-client/0.0.55:
+ resolution: {integrity: sha512-n/XjFhCgUYYo3mrVsuCa11iyXkbBgcRGIT8fDfdkuLjzfXamxt0eJMFbz8lpH85pTh7O7xTQzCxvi5YIi7zBLw==}
dev: false
/@halo-dev/richtext-editor/0.0.0-alpha.16_vue@3.2.45:
diff --git a/src/modules/contents/comments/CommentList.vue b/src/modules/contents/comments/CommentList.vue
index b74169a70..42e2d9c46 100644
--- a/src/modules/contents/comments/CommentList.vue
+++ b/src/modules/contents/comments/CommentList.vue
@@ -170,6 +170,8 @@ const handleApproveInBatch = async () => {
const promises = commentsToUpdate.map((comment) => {
const commentToUpdate = comment.comment;
commentToUpdate.spec.approved = true;
+ // TODO: 暂时由前端设置发布时间。see https://github.com/halo-dev/halo/pull/2746
+ commentToUpdate.spec.approvedTime = new Date().toISOString();
return apiClient.extension.comment.updatecontentHaloRunV1alpha1Comment(
{
name: commentToUpdate.metadata.name,
diff --git a/src/modules/contents/comments/components/CommentListItem.vue b/src/modules/contents/comments/components/CommentListItem.vue
index dbf99efa0..857aa5816 100644
--- a/src/modules/contents/comments/components/CommentListItem.vue
+++ b/src/modules/contents/comments/components/CommentListItem.vue
@@ -85,6 +85,8 @@ const handleApproveReplyInBatch = async () => {
const promises = repliesToUpdate.map((reply) => {
const replyToUpdate = reply.reply;
replyToUpdate.spec.approved = true;
+ // TODO: 暂时由前端设置发布时间。see https://github.com/halo-dev/halo/pull/2746
+ replyToUpdate.spec.approvedTime = new Date().toISOString();
return apiClient.extension.reply.updatecontentHaloRunV1alpha1Reply({
name: replyToUpdate.metadata.name,
reply: replyToUpdate,
@@ -104,6 +106,8 @@ const handleApprove = async () => {
try {
const commentToUpdate = cloneDeep(props.comment.comment);
commentToUpdate.spec.approved = true;
+ // TODO: 暂时由前端设置发布时间。see https://github.com/halo-dev/halo/pull/2746
+ commentToUpdate.spec.approvedTime = new Date().toISOString();
await apiClient.extension.comment.updatecontentHaloRunV1alpha1Comment({
name: commentToUpdate.metadata.name,
comment: commentToUpdate,
@@ -358,10 +362,10 @@ const subjectRefResult = computed(() => {
-
+
- {{ formatDatetime(comment?.comment?.metadata.creationTimestamp) }}
+ {{ formatDatetime(comment?.comment?.spec.approvedTime) }}
diff --git a/src/modules/contents/comments/components/ReplyListItem.vue b/src/modules/contents/comments/components/ReplyListItem.vue
index 56640db10..6cdf6f8d6 100644
--- a/src/modules/contents/comments/components/ReplyListItem.vue
+++ b/src/modules/contents/comments/components/ReplyListItem.vue
@@ -66,6 +66,8 @@ const handleApprove = async () => {
try {
const replyToUpdate = cloneDeep(props.reply.reply);
replyToUpdate.spec.approved = true;
+ // TODO: 暂时由前端设置发布时间。see https://github.com/halo-dev/halo/pull/2746
+ replyToUpdate.spec.approvedTime = new Date().toISOString();
await apiClient.extension.reply.updatecontentHaloRunV1alpha1Reply({
name: replyToUpdate.metadata.name,
reply: replyToUpdate,
@@ -164,10 +166,10 @@ const isHoveredReply = computed(() => {
-
+
- {{ formatDatetime(reply?.reply?.metadata.creationTimestamp) }}
+ {{ formatDatetime(reply?.reply?.spec.approvedTime) }}