diff --git a/web/src/components/compose-reply.vue b/web/src/components/compose-reply.vue index 867182c5..dbb835c0 100644 --- a/web/src/components/compose-reply.vue +++ b/web/src/components/compose-reply.vue @@ -4,74 +4,48 @@ {{ formatPrettyTime(comment.created_on) }} -
- - - - {{ thumbsUpCount }} -
-
- - - - - {{ thumbsUpCount }} -
-
- - - -
-
- - - - +
+
+ + + + {{ thumbsUpCount }} +
+
+ + + + + {{ thumbsUpCount }} +
+
+ + + +
+
+ + + + +
+ + 回复 + + + 取消 +
- - 回复 - - - 取消 -
- - + + 回复 @@ -120,36 +94,36 @@ const handleThumbsUp = () => { tweet_id: props.comment.post_id, comment_id: props.comment.id, }) - .then((_res) => { - hasThumbsUp.value = !hasThumbsUp.value - if (hasThumbsUp.value) { - thumbsUpCount.value++ - hasThumbsDown.value = false - } else { - thumbsUpCount.value-- - } - }) - .catch((err) => { - console.log(err); - }); + .then((_res) => { + hasThumbsUp.value = !hasThumbsUp.value + if (hasThumbsUp.value) { + thumbsUpCount.value++ + hasThumbsDown.value = false + } else { + thumbsUpCount.value-- + } + }) + .catch((err) => { + console.log(err); + }); }; const handleThumbsDown = () => { thumbsDownTweetComment({ tweet_id: props.comment.post_id, comment_id: props.comment.id, }) - .then((_res) => { - hasThumbsDown.value = !hasThumbsDown.value - if ( hasThumbsDown.value) { - if ( hasThumbsUp.value) { - thumbsUpCount.value-- - hasThumbsUp.value = false + .then((_res) => { + hasThumbsDown.value = !hasThumbsDown.value + if (hasThumbsDown.value) { + if (hasThumbsUp.value) { + thumbsUpCount.value-- + hasThumbsUp.value = false + } } - } - }) - .catch((err) => { - console.log(err); - }); + }) + .catch((err) => { + console.log(err); + }); }; const switchReply = (status: boolean) => { showReply.value = status; @@ -188,47 +162,66 @@ defineExpose({ switchReply }); .reply-switch { display: flex; align-items: center; + justify-content: space-between; text-align: right; font-size: 12px; margin: 10px 0; + + .actions { + display: flex; + align-items: center; + text-align: right; + font-size: 12px; + margin: 10px 0; + } + .time-item { font-size: 12px; opacity: 0.65; margin-right: 18px; } + .action-item { display: flex; align-items: center; - margin-right: 18px; + margin-left: 18px; opacity: 0.65; + .upvote-count { margin-left: 4px; font-size: 12px; } + &.hover { cursor: pointer; } } + .opacity-item { - opacity: 0.75; - } + opacity: 0.75; + margin-left: 18px; + } + .show { color: #18a058; cursor: pointer; } + .hide { opacity: 0.75; cursor: pointer; } } } + .dark { .reply-compose-wrap { background-color: rgba(16, 16, 20, 0.75); + .reply-switch { .show { color: #63e2b7; - } + } } } } diff --git a/web/src/components/reply-item.vue b/web/src/components/reply-item.vue index 75af3a33..622d5979 100644 --- a/web/src/components/reply-item.vue +++ b/web/src/components/reply-item.vue @@ -2,41 +2,29 @@
- + {{ props.reply.user.username }} {{ props.reply.at_user_id > 0 ? '回复' : ':' }} - + {{ props.reply.at_user.username }}
{{ props.reply.ip_loc }} - +