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