diff --git a/src/api/boardApi.js b/src/api/boardApi.js index 65cd1a2..21beebe 100644 --- a/src/api/boardApi.js +++ b/src/api/boardApi.js @@ -76,6 +76,14 @@ export const boardApi = { unblockComment(commentId) { return http.post(`/board/comments/${commentId}/unblock`) }, + // 신고 관리 (관리자) — 신고된 글/댓글 목록 + reports() { + return http.get('/board/reports') + }, + // 신고 무시 (관리자) — 블라인드 없이 신고 기록만 초기화 + dismissReport(targetType, targetId) { + return http.post('/board/reports/dismiss', { targetType, targetId }) + }, block(id, reason) { return http.post(`/board/posts/${id}/block`, { reason }) }, diff --git a/src/components/layout/AppHeader.vue b/src/components/layout/AppHeader.vue index cf7568e..cd9bc29 100644 --- a/src/components/layout/AppHeader.vue +++ b/src/components/layout/AppHeader.vue @@ -28,6 +28,7 @@ const TITLES = { users: '회원 관리', 'admin-tags': '태그 관리(관리자)', 'admin-default-categories': '기본 분류 설정', + 'admin-reports': '신고 관리', settings: '설정', 'settings-account': '계정정보', 'settings-account-edit': '가입정보 변경', diff --git a/src/components/layout/AppSidebar.vue b/src/components/layout/AppSidebar.vue index 4d2dbba..67d36f7 100644 --- a/src/components/layout/AppSidebar.vue +++ b/src/components/layout/AppSidebar.vue @@ -25,6 +25,7 @@ const icons = { board: '', users: '', sliders: '', + flag: '', } @@ -106,6 +107,10 @@ const icons = { 기본 분류 설정 + + + 신고 관리 + diff --git a/src/router/index.js b/src/router/index.js index 95e30e3..e665040 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -104,6 +104,12 @@ const router = createRouter({ component: () => import('../views/admin/DefaultCategoryView.vue'), meta: { requiresAuth: true, requiresAdmin: true }, }, + { + path: '/admin/reports', + name: 'admin-reports', + component: () => import('../views/admin/ReportAdminView.vue'), + meta: { requiresAuth: true, requiresAdmin: true }, + }, { // 구 가계부 대시보드 → 내역으로 (대시보드 정보는 홈/통계로 이전) path: '/account', diff --git a/src/views/admin/ReportAdminView.vue b/src/views/admin/ReportAdminView.vue new file mode 100644 index 0000000..67bd59a --- /dev/null +++ b/src/views/admin/ReportAdminView.vue @@ -0,0 +1,332 @@ + + + + + + + 신고 누적 5건 이상이면 자동 블라인드됩니다. 관리자는 여기서 신고 내용을 검토해 + 블라인드 하거나, 정상 글이면 신고 무시로 정리할 수 있습니다. + + ↻ 새로고침 + + + {{ error }} + 불러오는 중… + + 🎉 신고된 글·댓글이 없습니다. + + + + 총 {{ items.length }}건 + · 블라인드 {{ blockedCount }}건 + + + + + + + {{ it.targetType === 'POST' ? '글' : '댓글' }} + + {{ categoryLabel(it.category) }} + 🚩 {{ it.reportCount }} + 블라인드됨 + {{ formatTime(it.lastReportedAt) }} + + + + [{{ it.title }}] 의 댓글 + {{ it.title }} + + {{ it.content }} + 작성자: {{ it.authorName || '알 수 없음' }} + + + 글 보기 + + 블라인드 + + + 블라인드 해제 + + + 신고 무시 + + + + + + + + +
+ 신고 누적 5건 이상이면 자동 블라인드됩니다. 관리자는 여기서 신고 내용을 검토해 + 블라인드 하거나, 정상 글이면 신고 무시로 정리할 수 있습니다. +
{{ error }}
불러오는 중…
🎉 신고된 글·댓글이 없습니다.
+ 총 {{ items.length }}건 + · 블라인드 {{ blockedCount }}건 +
{{ it.content }}
작성자: {{ it.authorName || '알 수 없음' }}