- 목록 행 클릭 시 현재 쿼리(page/tag/keyword/searchType)를 상세로 전달 - 상세 목록 버튼·삭제 후 이동도 같은 쿼리로 복귀 → 1페이지 초기화 방지 (브라우저 뒤로가기는 기존에도 URL 쿼리로 복원됨) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -55,7 +55,7 @@ async function removePost() {
|
|||||||
if (!(await dialog.confirm('이 게시글을 삭제하시겠습니까?', { title: '게시글 삭제', danger: true }))) return
|
if (!(await dialog.confirm('이 게시글을 삭제하시겠습니까?', { title: '게시글 삭제', danger: true }))) return
|
||||||
try {
|
try {
|
||||||
await boardApi.remove(postId)
|
await boardApi.remove(postId)
|
||||||
router.replace(`/board/${category.value}`)
|
router.replace({ path: `/board/${category.value}`, query: route.query })
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
alert(e.response?.data?.message || '삭제에 실패했습니다.')
|
alert(e.response?.data?.message || '삭제에 실패했습니다.')
|
||||||
}
|
}
|
||||||
@@ -219,7 +219,7 @@ onMounted(load)
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<IconBtn icon="list" title="목록" @click="router.push(`/board/${category}`)" />
|
<IconBtn icon="list" title="목록" @click="router.push({ path: `/board/${category}`, query: route.query })" />
|
||||||
<div class="right-actions">
|
<div class="right-actions">
|
||||||
<!-- 관리자 제한/해제 -->
|
<!-- 관리자 제한/해제 -->
|
||||||
<button v-if="isAdmin && !post.blocked" type="button" class="warn" @click="blockPost">열람 제한</button>
|
<button v-if="isAdmin && !post.blocked" type="button" class="warn" @click="blockPost">열람 제한</button>
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ onMounted(loadTags)
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="p in posts" :key="p.id" :class="{ 'notice-row': p.notice }" @click="router.push(`/board/${category}/${p.id}`)">
|
<tr v-for="p in posts" :key="p.id" :class="{ 'notice-row': p.notice }" @click="router.push({ path: `/board/${category}/${p.id}`, query: route.query })">
|
||||||
<td>
|
<td>
|
||||||
<span v-if="p.notice" class="notice-badge">공지</span>
|
<span v-if="p.notice" class="notice-badge">공지</span>
|
||||||
<template v-if="p.blocked && !isAdmin">
|
<template v-if="p.blocked && !isAdmin">
|
||||||
|
|||||||
Reference in New Issue
Block a user