Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -147,6 +147,14 @@ async function reportComment(c) {
|
||||
alert(e.response?.data?.message || '신고에 실패했습니다.')
|
||||
}
|
||||
}
|
||||
async function unblockComment(c) {
|
||||
try {
|
||||
await boardApi.unblockComment(c.id)
|
||||
await refreshComments()
|
||||
} catch (e) {
|
||||
alert(e.response?.data?.message || '해제에 실패했습니다.')
|
||||
}
|
||||
}
|
||||
|
||||
// 댓글 목록만 새로고침 (다른 사람이 단 댓글·추천 반영)
|
||||
const refreshingComments = ref(false)
|
||||
@@ -366,6 +374,10 @@ onMounted(load)
|
||||
v-if="!isAdmin && auth.user && c.authorId !== auth.user.id"
|
||||
type="button" class="creport" @click="reportComment(c)"
|
||||
>🚩 신고</button>
|
||||
<button
|
||||
v-if="isAdmin && c.blocked"
|
||||
type="button" class="cunblock" @click="unblockComment(c)"
|
||||
>블라인드 해제</button>
|
||||
</div>
|
||||
</template>
|
||||
</li>
|
||||
@@ -662,6 +674,13 @@ button.notice-btn {
|
||||
color: #c0392b;
|
||||
opacity: 0.85;
|
||||
}
|
||||
.cunblock {
|
||||
padding: 0.2rem 0.6rem;
|
||||
font-size: 0.8rem;
|
||||
border-radius: 999px;
|
||||
border-color: hsla(160, 100%, 37%, 1);
|
||||
color: hsla(160, 100%, 37%, 1);
|
||||
}
|
||||
.comment-votes {
|
||||
display: flex;
|
||||
gap: 0.4rem;
|
||||
|
||||
Reference in New Issue
Block a user