Improvements to download button, just makes more sense, and other stuff

This commit is contained in:
2026-02-14 18:54:31 -07:00
parent 7c47b32c68
commit 1700d127c3
5 changed files with 14 additions and 23 deletions

View File

@@ -113,7 +113,7 @@ export default function Installs () {
<div className='downloads-container'> <div className='downloads-container'>
<div <div
className={`downloads-scroll ${ className={`downloads-scroll ${
platform() === 'windows' platform() == 'windows'
? 'h-[calc(100vh-116px)]' ? 'h-[calc(100vh-116px)]'
: 'h-[calc(100vh-84px)]' : 'h-[calc(100vh-84px)]'
}`} }`}
@@ -129,7 +129,7 @@ export default function Installs () {
if (!info) return false if (!info) return false
if ( if (
platform() === 'linux' && platform() == 'linux' &&
info.wine && info.wine &&
!normalConfig?.settings.useWineOnUnixWhenNeeded !normalConfig?.settings.useWineOnUnixWhenNeeded
) )
@@ -165,7 +165,7 @@ export default function Installs () {
const info = getVersionInfo(v) const info = getVersionInfo(v)
if (!info) return false if (!info) return false
if ( if (
platform() === 'linux' && platform() == 'linux' &&
info.wine && info.wine &&
!normalConfig?.settings !normalConfig?.settings
.useWineOnUnixWhenNeeded .useWineOnUnixWhenNeeded
@@ -200,7 +200,7 @@ export default function Installs () {
const info = getVersionInfo(v) const info = getVersionInfo(v)
if (!info) return false if (!info) return false
if ( if (
platform() === 'linux' && platform() == 'linux' &&
info.wine && info.wine &&
!normalConfig?.settings.useWineOnUnixWhenNeeded !normalConfig?.settings.useWineOnUnixWhenNeeded
) )
@@ -291,7 +291,7 @@ export default function Installs () {
executable: verInfo.executable, executable: verInfo.executable,
displayName: verInfo.displayName, displayName: verInfo.displayName,
useWine: !!( useWine: !!(
platform() === 'linux' && platform() == 'linux' &&
verInfo.wine && verInfo.wine &&
normalConfig?.settings.useWineOnUnixWhenNeeded normalConfig?.settings.useWineOnUnixWhenNeeded
), ),
@@ -329,8 +329,7 @@ export default function Installs () {
title='This version is using wine. It cannot be guarenteed to work fully and might not work at all.' title='This version is using wine. It cannot be guarenteed to work fully and might not work at all.'
hidden={ hidden={
!( !(
platform() === 'linux' && platform() == 'linux' && getVersionInfo(entry)?.wine
getVersionInfo(entry)?.wine
) || ) ||
needsRevisionUpdate( needsRevisionUpdate(
getVersionInfo(entry)?.lastRevision, getVersionInfo(entry)?.lastRevision,

View File

@@ -88,7 +88,7 @@ export default function RootLayout ({
) )
.filter(v => { .filter(v => {
if ( if (
platform() === 'linux' && platform() == 'linux' &&
v.wine && v.wine &&
!normalConfig.settings.useWineOnUnixWhenNeeded !normalConfig.settings.useWineOnUnixWhenNeeded
) )

View File

@@ -54,7 +54,7 @@ export default function Installs () {
<div className='downloads-container'> <div className='downloads-container'>
<div <div
className={`downloads-scroll ${ className={`downloads-scroll ${
platform() === 'windows' platform() == 'windows'
? 'h-[calc(100vh-116px)]' ? 'h-[calc(100vh-116px)]'
: 'h-[calc(100vh-84px)]' : 'h-[calc(100vh-84px)]'
}`} }`}

View File

@@ -137,7 +137,7 @@ export default function Sidebar () {
if (!info) return false if (!info) return false
if ( if (
platform() === 'linux' && platform() == 'linux' &&
info.wine && info.wine &&
!normalConfig?.settings.useWineOnUnixWhenNeeded !normalConfig?.settings.useWineOnUnixWhenNeeded
) )

View File

@@ -12,10 +12,8 @@ export default function VersionsDownloadPopup () {
selectedGame, selectedGame,
setViewingInfoFromDownloads, setViewingInfoFromDownloads,
downloadedVersionsConfig, downloadedVersionsConfig,
downloadProgress,
downloadVersions, downloadVersions,
getGameInfo, getGameInfo
downloadQueue
} = useGlobal() } = useGlobal()
if (!selectedGame) return <></> if (!selectedGame) return <></>
@@ -81,25 +79,19 @@ export default function VersionsDownloadPopup () {
onClick={() => { onClick={() => {
if (downloadedVersionsConfig) { if (downloadedVersionsConfig) {
downloadVersions(selectedVersionList) downloadVersions(selectedVersionList)
setPopupMode(1)
} }
}} }}
disabled={selectedVersionList.length === 0} disabled={selectedVersionList.length == 0}
title={ title={
selectedVersionList.length === 0 selectedVersionList.length == 0
? 'Select at least one version to download' ? 'Select at least one version to download'
: downloadProgress.length > 0 || downloadQueue.length > 0
? `Add ${selectedVersionList.length} version${
selectedVersionList.length == 1 ? '' : 's'
} to download queue`
: `Download ${selectedVersionList.length} version${ : `Download ${selectedVersionList.length} version${
selectedVersionList.length == 1 ? '' : 's' selectedVersionList.length == 1 ? '' : 's'
} of ${getGameInfo(selectedGame)?.name}` } of ${getGameInfo(selectedGame)?.name}`
} }
> >
{downloadProgress.length > 0 || downloadQueue.length > 0 Download {selectedVersionList.length} version
? `Add ${selectedVersionList.length} to Queue`
: `Download ${selectedVersionList.length}`}{' '}
version
{selectedVersionList.length == 1 ? '' : 's'} {selectedVersionList.length == 1 ? '' : 's'}
</button> </button>
<button <button