mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-04-20 10:57:28 +08:00
feat: comment editor required login
This commit is contained in:
@@ -32,7 +32,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</ReactionsGroup>
|
</ReactionsGroup>
|
||||||
</div>
|
</div>
|
||||||
<CommentEditor v-if="showEditor" @submit="submitReply" :loading="isWaitingForReply" />
|
<div class="comment-editor-wrapper">
|
||||||
|
<CommentEditor v-if="showEditor" @submit="submitReply" :loading="isWaitingForReply" :disabled="!isLoggedIn" />
|
||||||
|
<LoginOverlay v-if="showEditor && !loggedIn" />
|
||||||
|
</div>
|
||||||
<div v-if="comment.reply && comment.reply.length" class="reply-toggle" @click="toggleReplies">
|
<div v-if="comment.reply && comment.reply.length" class="reply-toggle" @click="toggleReplies">
|
||||||
<i v-if="showReplies" class="fas fa-chevron-up reply-toggle-icon"></i>
|
<i v-if="showReplies" class="fas fa-chevron-up reply-toggle-icon"></i>
|
||||||
<i v-else class="fas fa-chevron-down reply-toggle-icon"></i>
|
<i v-else class="fas fa-chevron-down reply-toggle-icon"></i>
|
||||||
@@ -75,6 +78,8 @@ import { API_BASE_URL, toast } from '../main'
|
|||||||
import { getToken, authState } from '../utils/auth'
|
import { getToken, authState } from '../utils/auth'
|
||||||
import ReactionsGroup from './ReactionsGroup.vue'
|
import ReactionsGroup from './ReactionsGroup.vue'
|
||||||
import DropdownMenu from './DropdownMenu.vue'
|
import DropdownMenu from './DropdownMenu.vue'
|
||||||
|
import LoginOverlay from './LoginOverlay.vue'
|
||||||
|
|
||||||
const CommentItem = {
|
const CommentItem = {
|
||||||
name: 'CommentItem',
|
name: 'CommentItem',
|
||||||
emits: ['deleted'],
|
emits: ['deleted'],
|
||||||
@@ -205,7 +210,7 @@ const CommentItem = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CommentItem.components = { CommentItem, CommentEditor, BaseTimeline, ReactionsGroup, DropdownMenu, VueEasyLightbox }
|
CommentItem.components = { CommentItem, CommentEditor, BaseTimeline, ReactionsGroup, DropdownMenu, VueEasyLightbox, LoginOverlay }
|
||||||
|
|
||||||
export default CommentItem
|
export default CommentItem
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user