From ca27dcc5ec5f77e90d917236a48436023757cc94 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Sat, 19 Oct 2024 13:47:39 +0800 Subject: [PATCH] fix: can not return to post list after publishing when re-logged in Signed-off-by: Ryan Wang --- ui/console-src/modules/contents/pages/SinglePageEditor.vue | 2 +- ui/console-src/modules/contents/posts/PostEditor.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/console-src/modules/contents/pages/SinglePageEditor.vue b/ui/console-src/modules/contents/pages/SinglePageEditor.vue index 6287f2e5ce..5615d6102f 100644 --- a/ui/console-src/modules/contents/pages/SinglePageEditor.vue +++ b/ui/console-src/modules/contents/pages/SinglePageEditor.vue @@ -223,7 +223,7 @@ const handlePublish = async () => { if (returnToView.value && permalink) { window.location.href = permalink; } else { - router.back(); + router.push({ name: "SinglePages" }); } } else { formState.value.page.spec.publish = true; diff --git a/ui/console-src/modules/contents/posts/PostEditor.vue b/ui/console-src/modules/contents/posts/PostEditor.vue index f55527c48c..cd783c4973 100644 --- a/ui/console-src/modules/contents/posts/PostEditor.vue +++ b/ui/console-src/modules/contents/posts/PostEditor.vue @@ -236,7 +236,7 @@ const handlePublish = async () => { if (returnToView.value === "true" && permalink) { window.location.href = permalink; } else { - router.back(); + router.push({ name: "Posts" }); } } else { const { data } = await consoleApiClient.content.post.draftPost({