Improve navigation logic after publishing content (#7775)

This commit is contained in:
Ryan Wang
2025-09-20 23:35:36 +08:00
committed by GitHub
parent ba23e6c07b
commit 6bc81a9866
2 changed files with 15 additions and 3 deletions

View File

@@ -262,9 +262,15 @@ const handlePublish = async () => {
});
if (returnToView.value === "true" && permalink) {
handleClearCache(name.value);
window.location.href = permalink;
} else {
return;
}
if (router.options.history.state.back === null) {
router.push({ name: "Posts" });
} else {
router.back();
}
} else {
const { data } = await consoleApiClient.content.post.draftPost({