More fixes

This commit is contained in:
Lncvrt committed 2026-04-13 13:28:58 -07:00
1 parent 91ff7caaed
commit 12914e42dd
3 files changed
+14 -8

No files matched your search

+12 -6
View File
@@ -461,7 +461,12 @@ export default function RootLayout ({
const versionId = downloadQueue[0] const versionId = downloadQueue[0]
const downloadInfo = downloadProgress.find(d => d.version == versionId) const downloadInfo = downloadProgress.find(d => d.version == versionId)
if (!downloadInfo) return if (!downloadInfo) {
setDownloadProgress(prev => prev.filter(d => d.version !== versionId))
setDownloadQueue(prev => prev.slice(1))
setIsProcessingQueue(false)
return
}
const info = serverVersionList?.versions.find(vf => vf.id == versionId) const info = serverVersionList?.versions.find(vf => vf.id == versionId)
if (!info) { if (!info) {
@@ -614,22 +619,23 @@ export default function RootLayout ({
const verInfo = serverVersionList.versions.find(item => item.id === key) const verInfo = serverVersionList.versions.find(item => item.id === key)
if ( if (
!verInfo || verInfo &&
(verInfo.lastRevision > 0 && value / 1000 <= verInfo.lastRevision) verInfo.lastRevision > 0 &&
value / 1000 <= verInfo.lastRevision
) { ) {
if ( if (
await exists('game/' + key + '/' + verInfo?.executable, { await exists('game/' + key + '/' + verInfo.executable, {
baseDir: BaseDirectory.AppLocalData baseDir: BaseDirectory.AppLocalData
}) })
) )
await remove('game/' + key + '/' + verInfo?.executable, { await remove('game/' + key + '/' + verInfo.executable, {
baseDir: BaseDirectory.AppLocalData, baseDir: BaseDirectory.AppLocalData,
recursive: true recursive: true
}) })
} }
} }
})() })()
}, [serverVersionList, downloadVersions, versionsList]) }, [serverVersionList, versionsList])
useEffect(() => { useEffect(() => {
if ( if (
+1 -1
View File
@@ -203,7 +203,7 @@ export default function DownloadsPopup () {
</div> </div>
) : v.hash_checking ? ( ) : v.hash_checking ? (
<span className='text-blue-300 inline-block w-full text-center'> <span className='text-blue-300 inline-block w-full text-center'>
Verifying file integerty... Verifying file integrity...
</span> </span>
) : v.unzipping ? ( ) : v.unzipping ? (
<div className='flex flex-col gap-1 w-full'> <div className='flex flex-col gap-1 w-full'>
+1 -1
View File
@@ -23,7 +23,7 @@ export default function VersionChangelogPopup () {
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{
__html: DOMPurify.sanitize( __html: DOMPurify.sanitize(
atob(versionInfo?.changelog ?? '') atob(versionInfo?.changelog ?? '')
.replaceAll('- ', '&bull; ') .replace(/^- /gm, '&bull; ')
.replaceAll(/`([^`]+)`/g, '<code>$1</code>') .replaceAll(/`([^`]+)`/g, '<code>$1</code>')
) )
}} }}