From cd61726b8e4b8690d75cb236ad5e0f22dd011899 Mon Sep 17 00:00:00 2001 From: choibk Date: Sun, 25 Jan 2026 01:24:12 +0900 Subject: [PATCH] =?UTF-8?q?UI=20=EA=B0=9C=EC=84=A0:=20=EC=97=85=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=8A=B8=20=ED=9E=88=EC=8A=A4=ED=86=A0=EB=A6=AC=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=EB=84=A4=EC=9D=B4=EC=85=98=20?= =?UTF-8?q?=EB=B0=8F=20=EC=B5=9C=EB=8C=80=20=ED=91=9C=EA=B8=B0=20=EC=A0=9C?= =?UTF-8?q?=ED=95=9C(50=EA=B0=9C)=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/routes/system.js | 2 +- src/platform/pages/VersionPage.tsx | 88 ++++++++++++++++++++++-------- 2 files changed, 65 insertions(+), 25 deletions(-) diff --git a/server/routes/system.js b/server/routes/system.js index 51c3795..2e8b4cb 100644 --- a/server/routes/system.js +++ b/server/routes/system.js @@ -496,7 +496,7 @@ router.get('/version/remote', isAuthenticated, hasRole('admin'), async (req, res // Also ensure we are looking at the remote tags directly if possible for the 'latest' check // but for history we still use the fetched local tags const format = '%(refname:short)|%(contents:subject)|%(contents:body)|%(creatordate:iso8601)'; - const historyCmd = `git for-each-ref refs/tags --sort=-creatordate --format="${format}" --count=10`; + const historyCmd = `git for-each-ref refs/tags --sort=-creatordate --format="${format}" --count=50`; exec(historyCmd, (err, stdout, stderr) => { const lines = stdout ? stdout.trim().split('\n') : []; diff --git a/src/platform/pages/VersionPage.tsx b/src/platform/pages/VersionPage.tsx index d3cbc90..d1b3ea7 100644 --- a/src/platform/pages/VersionPage.tsx +++ b/src/platform/pages/VersionPage.tsx @@ -1,7 +1,7 @@ import { useState, useEffect } from 'react'; import { Card } from '../../shared/ui/Card'; import { apiClient } from '../../shared/api/client'; -import { Info, Cpu, Database, Server, Hash, Calendar, RefreshCw, AlertTriangle, CheckCircle2 } from 'lucide-react'; +import { Info, Cpu, Database, Server, Hash, Calendar, RefreshCw, AlertTriangle, CheckCircle2, ChevronLeft, ChevronRight } from 'lucide-react'; interface VersionInfo { status: string; @@ -36,6 +36,8 @@ export function VersionPage() { const [checkingRemote, setCheckingRemote] = useState(false); const [updating, setUpdating] = useState(false); const [updateResult, setUpdateResult] = useState<{ success: boolean; message: string } | null>(null); + const [currentPage, setCurrentPage] = useState(1); + const ITEMS_PER_PAGE = 5; const fetchVersion = async () => { setLoading(true); @@ -59,6 +61,7 @@ export function VersionPage() { console.error('Failed to fetch remote version info', err); } finally { setCheckingRemote(false); + setCurrentPage(1); } }; @@ -286,31 +289,68 @@ export function VersionPage() {
{remoteInfo?.history && remoteInfo.history.length > 0 ? ( - remoteInfo.history.map((entry, idx) => ( - -
-
- - {entry.type} - - v{entry.version} + <> + {remoteInfo.history + .slice((currentPage - 1) * ITEMS_PER_PAGE, currentPage * ITEMS_PER_PAGE) + .map((entry, idx) => ( + +
+
+ + {entry.type} + + v{entry.version} +
+
+
+

{entry.title}

+
+
{entry.date}
+
+
    + {entry.changes.map((change, i) => ( +
  • +
    + {change} +
  • + ))} +
+
+ ))} + + {/* Pagination Controls */} + {remoteInfo.history.length > ITEMS_PER_PAGE && ( +
+ + +
+ {Array.from({ length: Math.ceil(Math.min(50, remoteInfo.history.length) / ITEMS_PER_PAGE) }).map((_, i) => ( + + ))}
-
-
-

{entry.title}

-
-
{entry.date}
+ +
-
    - {entry.changes.map((change, i) => ( -
  • -
    - {change} -
  • - ))} -
- - )) + )} + ) : (
원격 저장소에서 업데이트 내역을 가져오는 중이거나 내역이 없습니다.