From 8270e420e44c58d37d21b5f0db1aa55c235d335e Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Thu, 30 Apr 2026 21:51:04 -0700 Subject: [PATCH] Redesign downloads menu & add install count to manage game popup --- src/popups/GamesDownload.tsx | 83 +++++++-------------------------- src/popups/ManageGame.tsx | 20 ++++++++ src/popups/VersionsDownload.tsx | 44 ++++++++--------- src/styles/globals.css | 4 -- 4 files changed, 57 insertions(+), 94 deletions(-) diff --git a/src/popups/GamesDownload.tsx b/src/popups/GamesDownload.tsx index 095dc15..aed5dcf 100644 --- a/src/popups/GamesDownload.tsx +++ b/src/popups/GamesDownload.tsx @@ -1,15 +1,9 @@ import { useGlobal } from '@/providers/GlobalProvider' -import { - faCheck, - faCode, - faDownload, - faShieldHalved, - faWarning -} from '@fortawesome/free-solid-svg-icons' +import { faDownload, faInfo } from '@fortawesome/free-solid-svg-icons' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' export default function GamesDownloadPopup () { - const { serverVersionList, setSelectedGame, versionsList } = useGlobal() + const { serverVersionList, setSelectedGame } = useGlobal() return ( <> @@ -23,68 +17,25 @@ export default function GamesDownloadPopup () { if (gameVersions.length > 0) return true }) .map((v, i) => ( -
-

{v.name}

-
-
-

- {(() => { - const gameVersions = serverVersionList.versions.filter( - vf => vf.game === v.id - ) - const installed = gameVersions.filter(v => - Object.keys(versionsList).includes(v.id) - ).length - return gameVersions.length - ? `${installed}/${gameVersions.length}` - : 'N/A' - })()}{' '} - versions installed -

-
- - -
- +
+

{v.name}

+
))} diff --git a/src/popups/ManageGame.tsx b/src/popups/ManageGame.tsx index 98d4251..979b40f 100644 --- a/src/popups/ManageGame.tsx +++ b/src/popups/ManageGame.tsx @@ -3,6 +3,7 @@ import { faCheck, faCode, + faDownload, faHardDrive, faShieldHalved, faWarning @@ -83,6 +84,25 @@ export default function ManageGamePopup () {

Developer: {gameInfo?.developer}

+