diff --git a/src/app/game/page.tsx b/src/app/game/page.tsx index aabfe0f..12f8bb4 100644 --- a/src/app/game/page.tsx +++ b/src/app/game/page.tsx @@ -10,7 +10,6 @@ import { platform } from '@tauri-apps/plugin-os' export default function Installs () { const { - downloadProgress, showPopup, setShowPopup, setPopupMode, @@ -44,7 +43,6 @@ export default function Installs () { setShowPopup(true) setFadeOut(false) }} - disabled={downloadProgress.length != 0} title='Click to download more versions of this game.' > Download versions diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 46f5d9d..d58ea1a 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -225,6 +225,9 @@ export default function RootLayout ({ .filter(v => !downloadedVersionsConfig?.list.includes(v.id)) .filter(v => { if (game && v.game != game) return false + if (downloadProgress.length != 0) { + return !downloadProgress.some(d => d.version === v.id) + } return true }) .sort((a, b) => { @@ -800,11 +803,16 @@ export default function RootLayout ({ setTimeout(() => setShowPopup(false), 200) downloadVersions() }} - title={`Click to download ${ - selectedVersionList.length - } version${ - selectedVersionList.length == 1 ? '' : 's' - } of ${getVersionGame(selectedGame)?.name}`} + disabled={downloadProgress.length != 0} + title={ + downloadProgress.length != 0 + ? "You cannot download the versions as you have another download that hasn't completed." + : `Click to download ${ + selectedVersionList.length + } version${ + selectedVersionList.length == 1 ? '' : 's' + } of ${getVersionGame(selectedGame)?.name}` + } > Download {selectedVersionList.length} version {selectedVersionList.length == 1 ? '' : 's'} diff --git a/src/app/page.tsx b/src/app/page.tsx index 9348fca..aba7315 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -15,7 +15,6 @@ import { useRouter } from 'next/navigation' export default function Installs () { const { - downloadProgress, showPopup, setShowPopup, setPopupMode, @@ -48,7 +47,6 @@ export default function Installs () { setShowPopup(true) setFadeOut(false) }} - disabled={downloadProgress.length != 0} title='Click to download more games.' > Download game