From abeeab79d755c5594d27b34dc8e343906848cac7 Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Fri, 1 May 2026 13:06:29 -0700 Subject: [PATCH] Make it say there is no versions available if there are none, rather than showing nothing --- src/popups/GamesDownload.tsx | 28 ++++++--- src/popups/ManageGame.tsx | 19 +++--- src/popups/ManageVersion.tsx | 10 ++-- src/popups/VersionsDownload.tsx | 100 ++++++++++++++++++-------------- 4 files changed, 88 insertions(+), 69 deletions(-) diff --git a/src/popups/GamesDownload.tsx b/src/popups/GamesDownload.tsx index ea92fe9..eafdb3d 100644 --- a/src/popups/GamesDownload.tsx +++ b/src/popups/GamesDownload.tsx @@ -6,20 +6,28 @@ import { import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' export default function GamesDownloadPopup () { - const { serverVersionList, setSelectedGame } = useGlobal() + const { + serverVersionList, + setSelectedGame, + setManagingGame, + setPopupMode, + setShowPopup, + setFadeOut, + setViewingInfoFromDownloads + } = useGlobal() return ( <>

Select a game to download

{serverVersionList?.games - .filter(i => { + .filter(g => { const gameVersions = serverVersionList.versions.filter( - vf => vf.game === i.id + gv => gv.game === g.id ) if (gameVersions.length > 0) return true }) - .map((v, i) => ( + .map((g, i) => (
-

{v.name}

+

{g.name}

diff --git a/src/popups/ManageVersion.tsx b/src/popups/ManageVersion.tsx index 3b8f559..bc57260 100644 --- a/src/popups/ManageVersion.tsx +++ b/src/popups/ManageVersion.tsx @@ -101,12 +101,10 @@ export default function ManageVersionPopup () {

Size on disk:{' '} - {versionSize && versionSize > 0 - ? prettyBytes(versionSize, { - minimumFractionDigits: 2, - maximumFractionDigits: 2 - }) - : 'N/A'} + {prettyBytes(versionSize, { + minimumFractionDigits: 2, + maximumFractionDigits: 2 + })}

Select versions to download

- {list.map((v, i) => ( -
- -

- {v.displayName} -

- + +

+ {v.displayName} +

+ +
+ )) + ) : ( +
+

No versions available to download

+

You may have all versions installed for this game

- ))} + )}