Remove this case, I want to eventually make it close the popup but I haven't gotten that to work for some reason
This commit is contained in:
@@ -614,97 +614,89 @@ export default function RootLayout ({
|
|||||||
<>
|
<>
|
||||||
<p className='text-xl text-center'>Downloads</p>
|
<p className='text-xl text-center'>Downloads</p>
|
||||||
<div className='popup-content'>
|
<div className='popup-content'>
|
||||||
{downloadProgress.length === 0 ? (
|
{downloadProgress.map((v, i) => (
|
||||||
<p className='text-center mt-6'>
|
<div
|
||||||
No more downloads!
|
key={i}
|
||||||
</p>
|
className='popup-entry flex flex-col justify-between'
|
||||||
) : (
|
>
|
||||||
downloadProgress.map((v, i) => (
|
<p className='text-2xl text-center'>
|
||||||
<div
|
{
|
||||||
key={i}
|
getGameInfo(getVersionInfo(v.version)?.game)
|
||||||
className='popup-entry flex flex-col justify-between'
|
?.name
|
||||||
>
|
}{' '}
|
||||||
<p className='text-2xl text-center'>
|
v{getVersionInfo(v.version)?.versionName}
|
||||||
{
|
</p>
|
||||||
getGameInfo(
|
<div className='mt-6.25 flex items-center justify-between'>
|
||||||
getVersionInfo(v.version)?.game
|
{v.failed ? (
|
||||||
)?.name
|
<>
|
||||||
}{' '}
|
<div className='flex items-center'>
|
||||||
v{getVersionInfo(v.version)?.versionName}
|
<span className='text-red-500 inline-block w-full text-center'>
|
||||||
</p>
|
Download failed
|
||||||
<div className='mt-6.25 flex items-center justify-between'>
|
|
||||||
{v.failed ? (
|
|
||||||
<>
|
|
||||||
<div className='flex items-center'>
|
|
||||||
<span className='text-red-500 inline-block w-full text-center'>
|
|
||||||
Download failed
|
|
||||||
</span>
|
|
||||||
<button
|
|
||||||
className='button btntheme3 ml-30 mb-2'
|
|
||||||
onClick={() => {
|
|
||||||
setDownloadProgress(prev =>
|
|
||||||
prev.filter(
|
|
||||||
d => d.version !== v.version
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
title='Click to remove this version from this menu.'
|
|
||||||
>
|
|
||||||
Cancel
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
) : v.queued ? (
|
|
||||||
<span className='text-yellow-500 inline-block w-full text-center'>
|
|
||||||
Queued…
|
|
||||||
</span>
|
|
||||||
) : v.queued ? (
|
|
||||||
<span className='text-yellow-500 inline-block w-full text-center'>
|
|
||||||
Queued…
|
|
||||||
</span>
|
|
||||||
) : v.hash_checking ? (
|
|
||||||
<span className='text-blue-500 inline-block w-full text-center'>
|
|
||||||
Checking hash...
|
|
||||||
</span>
|
|
||||||
) : v.finishing ? (
|
|
||||||
<span className='text-green-500 inline-block w-full text-center'>
|
|
||||||
Finishing...
|
|
||||||
</span>
|
|
||||||
) : (
|
|
||||||
<div className='flex flex-col gap-1 w-full'>
|
|
||||||
<span className='text-center'>
|
|
||||||
Downloaded{' '}
|
|
||||||
{prettyBytes(v.progressBytes, {
|
|
||||||
minimumFractionDigits: 1,
|
|
||||||
maximumFractionDigits: 1
|
|
||||||
})}{' '}
|
|
||||||
of{' '}
|
|
||||||
{prettyBytes(
|
|
||||||
getVersionInfo(v.version)?.size ??
|
|
||||||
0,
|
|
||||||
{
|
|
||||||
minimumFractionDigits: 1,
|
|
||||||
maximumFractionDigits: 1
|
|
||||||
}
|
|
||||||
)}{' '}
|
|
||||||
(ETA: {formatEtaSmart(v.etaSecs)}{' '}
|
|
||||||
• Speed:{' '}
|
|
||||||
{prettyBytes(v.speed, {
|
|
||||||
minimumFractionDigits: 1,
|
|
||||||
maximumFractionDigits: 1
|
|
||||||
})}
|
|
||||||
/s)
|
|
||||||
</span>
|
</span>
|
||||||
<ProgressBar
|
<button
|
||||||
progress={v.progress}
|
className='button btntheme3 ml-30 mb-2'
|
||||||
className='w-full'
|
onClick={() => {
|
||||||
/>
|
setDownloadProgress(prev =>
|
||||||
|
prev.filter(
|
||||||
|
d => d.version !== v.version
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
title='Click to remove this version from this menu.'
|
||||||
|
>
|
||||||
|
Cancel
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
</>
|
||||||
</div>
|
) : v.queued ? (
|
||||||
|
<span className='text-yellow-500 inline-block w-full text-center'>
|
||||||
|
Queued…
|
||||||
|
</span>
|
||||||
|
) : v.queued ? (
|
||||||
|
<span className='text-yellow-500 inline-block w-full text-center'>
|
||||||
|
Queued…
|
||||||
|
</span>
|
||||||
|
) : v.hash_checking ? (
|
||||||
|
<span className='text-blue-500 inline-block w-full text-center'>
|
||||||
|
Checking hash...
|
||||||
|
</span>
|
||||||
|
) : v.finishing ? (
|
||||||
|
<span className='text-green-500 inline-block w-full text-center'>
|
||||||
|
Finishing...
|
||||||
|
</span>
|
||||||
|
) : (
|
||||||
|
<div className='flex flex-col gap-1 w-full'>
|
||||||
|
<span className='text-center'>
|
||||||
|
Downloaded{' '}
|
||||||
|
{prettyBytes(v.progressBytes, {
|
||||||
|
minimumFractionDigits: 1,
|
||||||
|
maximumFractionDigits: 1
|
||||||
|
})}{' '}
|
||||||
|
of{' '}
|
||||||
|
{prettyBytes(
|
||||||
|
getVersionInfo(v.version)?.size ?? 0,
|
||||||
|
{
|
||||||
|
minimumFractionDigits: 1,
|
||||||
|
maximumFractionDigits: 1
|
||||||
|
}
|
||||||
|
)}{' '}
|
||||||
|
(ETA: {formatEtaSmart(v.etaSecs)} •
|
||||||
|
Speed:{' '}
|
||||||
|
{prettyBytes(v.speed, {
|
||||||
|
minimumFractionDigits: 1,
|
||||||
|
maximumFractionDigits: 1
|
||||||
|
})}
|
||||||
|
/s)
|
||||||
|
</span>
|
||||||
|
<ProgressBar
|
||||||
|
progress={v.progress}
|
||||||
|
className='w-full'
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
))
|
</div>
|
||||||
)}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
) : popupMode === 2 ? (
|
) : popupMode === 2 ? (
|
||||||
|
|||||||
Reference in New Issue
Block a user