From 0c5fd7fa7886a7e3b5f9d33066365e809b92a292 Mon Sep 17 00:00:00 2001 From: Tim <135014430+nagisa77@users.noreply.github.com> Date: Mon, 7 Jul 2025 13:21:07 +0800 Subject: [PATCH] feat(frontend): improve link copy and comment navigation --- open-isle-cli/src/components/CommentItem.vue | 4 +++- open-isle-cli/src/views/PostPageView.vue | 17 ++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/open-isle-cli/src/components/CommentItem.vue b/open-isle-cli/src/components/CommentItem.vue index 40c67f775..97d8af419 100644 --- a/open-isle-cli/src/components/CommentItem.vue +++ b/open-isle-cli/src/components/CommentItem.vue @@ -130,7 +130,9 @@ const CommentItem = { } const copyCommentLink = () => { const link = `${location.origin}${location.pathname}#comment-${props.comment.id}` - navigator.clipboard.writeText(link) + navigator.clipboard.writeText(link).then(() => { + toast.success('已复制') + }) } return { showReplies, toggleReplies, showEditor, toggleEditor, submitReply, copyCommentLink, renderMarkdown, isWaitingForReply } } diff --git a/open-isle-cli/src/views/PostPageView.vue b/open-isle-cli/src/views/PostPageView.vue index 6966ea5a5..118770402 100644 --- a/open-isle-cli/src/views/PostPageView.vue +++ b/open-isle-cli/src/views/PostPageView.vue @@ -89,7 +89,7 @@