mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-25 23:50:51 +08:00
Merge pull request #96 from nagisa77/codex/add-toast-for-link-copy-and-delay-jump-for-comments
Implement toast on copy and wait comment anchor
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user