Fixes & Improvements

This commit is contained in:
Lncvrt committed 2026-05-01 13:01:19 -07:00
1 parent 8270e420e4
commit 3e45caf4f3
7 files changed
+19 -16

No files matched your search

+1 -1
View File
@@ -828,7 +828,7 @@ export default function RootLayout ({
icon={ icon={
(popupMode == 0 && (popupMode == 0 &&
selectedGame && selectedGame &&
pathname === '/') || pathname === '/main') ||
viewingInfoFromDownloads || viewingInfoFromDownloads ||
(popupMode == 3 && showModInfo) || (popupMode == 3 && showModInfo) ||
popupMode == 4 popupMode == 4
+2 -2
View File
@@ -111,7 +111,7 @@ export default function Sidebar () {
: '' : ''
} ml-auto w-50 ${ } ml-auto w-50 ${
sidebarAlwaysShowGames || sidebarAlwaysShowGames ||
pathname === '/' || pathname === '/main' ||
pathname.startsWith('/main/game') pathname.startsWith('/main/game')
? '' ? ''
: 'hidden' : 'hidden'
@@ -164,7 +164,7 @@ export default function Sidebar () {
: '' : ''
} ml-auto w-47.5 ${ } ml-auto w-47.5 ${
sidebarAlwaysShowGames || sidebarAlwaysShowGames ||
pathname === '/' || pathname === '/main' ||
pathname.startsWith('/main/game') pathname.startsWith('/main/game')
? '' ? ''
: 'hidden' : 'hidden'
+6 -3
View File
@@ -1,5 +1,8 @@
import { useGlobal } from '@/providers/GlobalProvider' import { useGlobal } from '@/providers/GlobalProvider'
import { faDownload, faInfo } from '@fortawesome/free-solid-svg-icons' import {
faArrowUpRightFromSquare,
faInfo
} from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
export default function GamesDownloadPopup () { export default function GamesDownloadPopup () {
@@ -33,9 +36,9 @@ export default function GamesDownloadPopup () {
<button <button
className='button btntheme3' className='button btntheme3'
onClick={() => setSelectedGame(v.id)} onClick={() => setSelectedGame(v.id)}
title='Click to download more versions of the game.' title='Click to view more versions of the game.'
> >
<FontAwesomeIcon icon={faDownload} /> Download <FontAwesomeIcon icon={faArrowUpRightFromSquare} /> View
</button> </button>
</div> </div>
))} ))}
+1 -1
View File
@@ -41,7 +41,7 @@ export default function ManageVersionPopup () {
}) })
}, [managingVersion, setVersionSize, viewingInfoFromDownloads]) }, [managingVersion, setVersionSize, viewingInfoFromDownloads])
if (!managingVersion) return <></> if (!managingVersion) return null
const versionInfo = serverVersionList?.versions.find( const versionInfo = serverVersionList?.versions.find(
vf => vf.id == managingVersion vf => vf.id == managingVersion
+1 -1
View File
@@ -60,7 +60,7 @@ export default function ModDownloadsPopup () {
})() })()
}, [managingVersion]) }, [managingVersion])
if (!managingVersion || !serverVersionList) return <></> if (!managingVersion || !serverVersionList) return null
const versionInfo = serverVersionList.versions.find( const versionInfo = serverVersionList.versions.find(
v => v.id == managingVersion v => v.id == managingVersion
+1 -1
View File
@@ -6,7 +6,7 @@ import DOMPurify from 'dompurify'
export default function VersionChangelogPopup () { export default function VersionChangelogPopup () {
const { serverVersionList, managingVersion } = useGlobal() const { serverVersionList, managingVersion } = useGlobal()
if (!managingVersion) return <></> if (!managingVersion) return null
const versionInfo = serverVersionList?.versions.find( const versionInfo = serverVersionList?.versions.find(
vf => vf.id == managingVersion vf => vf.id == managingVersion
+7 -7
View File
@@ -17,13 +17,15 @@ export default function VersionsDownloadPopup () {
const game = serverVersionList?.games.find(g => g.id === selectedGame) const game = serverVersionList?.games.find(g => g.id === selectedGame)
if (!selectedGame || !game) return <></> if (!selectedGame || !game) return null
const list = getSpecialVersionsList(selectedGame)
return ( return (
<> <>
<p className='text-xl text-center'>Select versions to download</p> <p className='text-xl text-center'>Select versions to download</p>
<div className='popup-content'> <div className='popup-content'>
{getSpecialVersionsList(selectedGame).map((v, i) => ( {list.map((v, i) => (
<div <div
key={i} key={i}
className='popup-entry grid items-center gap-3' className='popup-entry grid items-center gap-3'
@@ -94,20 +96,18 @@ export default function VersionsDownloadPopup () {
<button <button
className='button btntheme1 w-fit mt-2 ml-2 -mb-4' className='button btntheme1 w-fit mt-2 ml-2 -mb-4'
onClick={() => { onClick={() => {
const allIds = getSpecialVersionsList(selectedGame).map(v => v.id) const allIds = list.map(v => v.id)
setSelectedVersionList(prev => setSelectedVersionList(prev =>
prev.length === allIds.length ? [] : allIds prev.length === allIds.length ? [] : allIds
) )
}} }}
title={ title={
selectedVersionList.length === selectedVersionList.length === list.length
getSpecialVersionsList(selectedGame).length
? 'Click to remove all selected versions for download.' ? 'Click to remove all selected versions for download.'
: 'Click to add all selected versions for download.' : 'Click to add all selected versions for download.'
} }
> >
{selectedVersionList.length === {selectedVersionList.length === list.length
getSpecialVersionsList(selectedGame).length
? 'Deselect All' ? 'Deselect All'
: 'Select All'} : 'Select All'}
</button> </button>