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-scroll ${
platform() === 'windows'
platform() == 'windows'
? 'h-[calc(100vh-116px)]'
: 'h-[calc(100vh-84px)]'
}`}
@@ -129,7 +129,7 @@ export default function Installs () {
if (!info) return false
if (
platform() === 'linux' &&
platform() == 'linux' &&
info.wine &&
!normalConfig?.settings.useWineOnUnixWhenNeeded
)
@@ -165,7 +165,7 @@ export default function Installs () {
const info = getVersionInfo(v)
if (!info) return false
if (
platform() === 'linux' &&
platform() == 'linux' &&
info.wine &&
!normalConfig?.settings
.useWineOnUnixWhenNeeded
@@ -200,7 +200,7 @@ export default function Installs () {
const info = getVersionInfo(v)
if (!info) return false
if (
platform() === 'linux' &&
platform() == 'linux' &&
info.wine &&
!normalConfig?.settings.useWineOnUnixWhenNeeded
)
@@ -291,7 +291,7 @@ export default function Installs () {
executable: verInfo.executable,
displayName: verInfo.displayName,
useWine: !!(
platform() === 'linux' &&
platform() == 'linux' &&
verInfo.wine &&
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.'
hidden={
!(
platform() === 'linux' &&
getVersionInfo(entry)?.wine
platform() == 'linux' && getVersionInfo(entry)?.wine
) ||
needsRevisionUpdate(
getVersionInfo(entry)?.lastRevision,

View File

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

View File

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

View File

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

View File

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