v1.12.25 대시보드 숫자 표기 및 접속자 목록 간소화

This commit is contained in:
2026-10-21 17:17:57 +09:00
parent 93dc6c04bd
commit 9e2fec6d6c
14 changed files with 349 additions and 195 deletions

View File

@@ -1,4 +1,5 @@
<script setup>
import { formatAnalyticsCount } from '~/lib/analytics-display.js'
const { data, error, refresh } = await useFetch('/admin/api/comments', {
query: { pageSize: 5 },
default: () => ({ items: [], pagination: { total: 0 } })
@@ -19,7 +20,7 @@ const formatCreatedAt = (value) => new Intl.DateTimeFormat('ko-KR', {
<template>
<section class="admin-comment-list border border-line bg-white px-4 py-3">
<h2 class="admin-comment-list__heading mb-1 text-xs font-semibold text-muted">최근 댓글 <span class="font-normal">· 전체 {{ data?.pagination.total || 0 }}개</span></h2>
<h2 class="admin-comment-list__heading mb-1 text-xs font-semibold text-muted">최근 댓글 <span class="font-normal">· 전체 {{ formatAnalyticsCount(data?.pagination.total) }}개</span></h2>
<p v-if="error" class="admin-comment-list__error text-xs text-red-700" role="alert">
댓글을 불러오지 못했습니다. <button type="button" class="underline" @click="refresh()">다시 시도</button>
</p>