diff --git a/package.json b/package.json index e5efe2c..6cccfdf 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "smartims", "private": true, - "version": "0.4.0.1", + "version": "0.4.0.0", "type": "module", "scripts": { "dev": "vite", diff --git a/server/package.json b/server/package.json index 8537666..b7fabc2 100644 --- a/server/package.json +++ b/server/package.json @@ -1,6 +1,6 @@ { "name": "server", - "version": "0.4.0.1", + "version": "0.4.0.0", "description": "", "main": "index.js", "scripts": { diff --git a/server/routes/system.js b/server/routes/system.js index 2e8b4cb..5da1139 100644 --- a/server/routes/system.js +++ b/server/routes/system.js @@ -548,10 +548,11 @@ router.get('/version/remote', isAuthenticated, hasRole('admin'), async (req, res // Filter 1: History is ONLY versions <= current const history = allTags.filter(t => compare(t.version, currentVersion) <= 0); - // Filter 2: Latest is the absolute newest tag available (could be > current) const latestFromRemote = allTags[0] || null; const needsUpdate = latestFromRemote ? (compare(latestFromRemote.version, currentVersion) > 0) : false; + console.log(`[VersionCheck] Current: "${currentVersion}", LatestTag: "${latestFromRemote?.version}", NeedsUpdate: ${needsUpdate}`); + res.json({ current: currentVersion, latest: latestFromRemote ? `v${latestFromRemote.version}` : null, diff --git a/src/platform/pages/VersionPage.tsx b/src/platform/pages/VersionPage.tsx index d1b3ea7..4cb8a53 100644 --- a/src/platform/pages/VersionPage.tsx +++ b/src/platform/pages/VersionPage.tsx @@ -113,11 +113,11 @@ export function VersionPage() { }; // Source of truth for versioning comes from the API - const currentVersion = remoteInfo?.current || '0.4.0'; + const currentVersion = remoteInfo?.current || healthIcon?.version || '0.4.0.0'; const buildDate = '2026-01-25'; - // Check if update is needed based on API-supplied needsUpdate flag - const needsUpdate = remoteInfo?.needsUpdate || false; + // IMPORTANT: needsUpdate should be true if remote has a higher version than local + const needsUpdate = !!remoteInfo?.needsUpdate; return (
@@ -136,51 +136,41 @@ export function VersionPage() {
- {/* Update Alert Banner - Based on Frontend Version comparison */} - {needsUpdate && !updateResult && ( -
-
-
-
- -
-
-
-

- {remoteInfo?.latestInfo?.type === 'urgent' ? '🚨 κΈ΄κΈ‰ λ³΄μ•ˆ/μ‹œμŠ€ν…œ μ—…λ°μ΄νŠΈ 발견' : '✨ μƒˆλ‘œμš΄ μ—…λ°μ΄νŠΈκ°€ κ°€λŠ₯ν•©λ‹ˆλ‹€'} -

- - {remoteInfo?.latestInfo?.type || 'patch'} - -
-

- ν˜„μž¬ 버전: v{currentVersion} β†’ μ΅œμ‹  버전: {remoteInfo?.latest} -

- {remoteInfo?.latestInfo && ( -
-

[{remoteInfo.latestInfo.title}]

-
    - {remoteInfo.latestInfo.changes.slice(0, 3).map((c, i) => ( -
  • - - {c} -
  • - ))} - {remoteInfo.latestInfo.changes.length > 3 &&
  • ...μ™Έ {remoteInfo.latestInfo.changes.length - 3}건
  • } -
-
- )} -
+ {/* Debug Info (Visible only for investigation) */} +
+ [Debug] Current: {currentVersion}, Latest: {remoteInfo?.latest}, NeedsUpdate: {String(needsUpdate)}, LatestInfo: {remoteInfo?.latestInfo ? 'Yes' : 'No'} +
+ + {/* Update Alert Banner - Enhanced Visibility */} + {needsUpdate && !updateResult && remoteInfo?.latestInfo && ( +
+
+
+ +
+
+
+

+ {remoteInfo.latestInfo.type === 'urgent' ? 'μ‹ μ†ν•œ μ‹œμŠ€ν…œ μ—…λ°μ΄νŠΈκ°€ ν•„μš”ν•©λ‹ˆλ‹€' : 'μƒˆλ‘œμš΄ ν”Œλž«νΌ κΈ°λŠ₯이 μ€€λΉ„λ˜μ—ˆμŠ΅λ‹ˆλ‹€'} +

+ + {remoteInfo.latestInfo.type} + +
+

+ ν˜„μž¬: v{currentVersion} β†’ μ°¨κΈ°: {remoteInfo.latest} +

-
+ +
)}