관리자 글 목록 백링크 열 추가

This commit is contained in:
2026-07-10 16:32:37 +09:00
parent d708381e09
commit 04c03ad604
7 changed files with 109 additions and 26 deletions

View File

@@ -819,7 +819,7 @@ const updatePostMenuPosition = () => {
const rect = trigger.getBoundingClientRect()
const menuWidth = 176
const estimatedHeight = 152
const estimatedHeight = 112
const margin = 8
const left = Math.max(margin, Math.min(rect.right - menuWidth, window.innerWidth - menuWidth - margin))
const opensUp = rect.bottom + estimatedHeight + margin > window.innerHeight
@@ -1227,6 +1227,7 @@ watch(postPageCount, (pageCount) => {
<th class="admin-posts__cell px-4 py-3">제목</th>
<th class="admin-posts__cell px-4 py-3">상태</th>
<th class="admin-posts__cell px-4 py-3">태그</th>
<th class="admin-posts__cell px-4 py-3">백링크</th>
<th class="admin-posts__cell px-4 py-3">조회수</th>
<th class="admin-posts__cell px-4 py-3">발행일</th>
<th class="admin-posts__cell admin-posts__cell-actions w-12 px-2 py-3 text-right">
@@ -1314,6 +1315,17 @@ watch(postPageCount, (pageCount) => {
</div>
<span v-else class="admin-posts__tag-empty text-muted">-</span>
</td>
<td class="admin-posts__cell admin-posts__cell-backlinks px-4 py-4">
<button
v-if="Number(post.backlinkCount || 0) > 0"
class="admin-posts__backlink-count inline-flex min-w-8 justify-center rounded border border-[#d7dce0] bg-white px-2 py-1 text-xs font-semibold text-[#394047] transition-colors hover:border-[#8e9cac] hover:bg-paper"
type="button"
@click="openReferenceModal(post)"
>
{{ formatAdminNumber(post.backlinkCount) }}
</button>
<span v-else class="admin-posts__backlink-empty text-muted">0</span>
</td>
<td class="admin-posts__cell admin-posts__cell-views px-4 py-4">
<p class="admin-posts__view-count text-[#394047]">
{{ formatAdminNumber(post.totalViews) }}
@@ -1392,14 +1404,6 @@ watch(postPageCount, (pageCount) => {
>
{{ post.isFeatured ? '추천 제거' : '게시글 추천' }}
</button>
<button
class="admin-posts__row-menu-item block w-full px-4 py-2.5 text-left hover:bg-[#f3f5f7]"
type="button"
role="menuitem"
@click="openReferenceModal(post)"
>
링크 확인
</button>
<button
class="admin-posts__row-menu-item block w-full px-4 py-2.5 text-left text-[#c0392b] hover:bg-[#fef2f2] disabled:opacity-50"
type="button"
@@ -1478,7 +1482,7 @@ watch(postPageCount, (pageCount) => {
<header class="admin-posts__reference-modal-header flex items-start justify-between gap-4 border-b border-line px-5 py-4">
<div class="min-w-0">
<p class="text-xs font-semibold uppercase text-muted">
링크 확인
백링크
</p>
<h2 id="admin-posts-reference-modal-title" class="mt-1 truncate text-lg font-semibold text-ink">
{{ referenceModalPost?.title || '(제목 없음)' }}
@@ -1514,16 +1518,21 @@ watch(postPageCount, (pageCount) => {
class="admin-posts__reference-item bg-white px-4 py-3"
>
<div class="flex flex-wrap items-center justify-between gap-3">
<NuxtLink
class="min-w-0 font-semibold text-ink hover:opacity-70"
:to="`/admin/posts/${item.id}`"
@click="closeReferenceModal"
>
<span class="min-w-0 font-semibold text-ink">
{{ item.title || '(제목 없음)' }}
</NuxtLink>
<span class="shrink-0 text-xs text-muted">
{{ item.referenceCount }}회 링크
</span>
<div class="flex shrink-0 items-center gap-3">
<span class="text-xs text-muted">
{{ item.referenceCount }}회 링크
</span>
<NuxtLink
class="admin-posts__reference-move inline-flex h-8 items-center border border-line px-3 text-xs font-semibold text-[#394047] transition-colors hover:bg-paper"
:to="`/admin/posts/${item.id}`"
@click="closeReferenceModal"
>
이동
</NuxtLink>
</div>
</div>
<div class="mt-1 flex flex-wrap items-center gap-2 text-xs text-muted">
<span>{{ getPostStatusLabel(item) }}</span>