1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-14 10:47:56 +01:00

Add progressbar when upscaling image (#858)

See history in #856

Co-authored-by: Aaron Liu <aaronliu0130@gmail.com>
This commit is contained in:
dabucz 2024-06-07 13:06:40 +02:00 committed by GitHub
parent dc031c16a8
commit 3424b8c481
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,13 +27,14 @@ function ProgressBar({
<div className="absolute z-50 flex h-full w-full flex-col items-center justify-center bg-base-300/50 backdrop-blur-lg"> <div className="absolute z-50 flex h-full w-full flex-col items-center justify-center bg-base-300/50 backdrop-blur-lg">
<div className="flex flex-col items-center rounded-btn bg-base-100/50 p-4 backdrop-blur-lg"> <div className="flex flex-col items-center rounded-btn bg-base-100/50 p-4 backdrop-blur-lg">
<Logo className="spinner mb-4 h-12 w-12" /> <Logo className="spinner mb-4 h-12 w-12" />
<p className="rounded-full px-2 pb-2 font-bold"> <p className="rounded-full px-2 pb-2 font-bold flex flex-col items-center">
{batchMode && "Batch Upscale In Progress: " + batchProgress} {batchMode && "Batch Upscale In Progress: " + batchProgress}
{!batchMode && {!batchMode &&
(doubleUpscaylCounter > 0 (doubleUpscaylCounter > 0
? `${progress}\nPass ${doubleUpscaylCounter}` ? `${progress}\nPass ${doubleUpscaylCounter}`
: `${progress}`)} : `${progress}`)}
<progress className='progress w-96 transition-width duration-200 ease-in-out' value={parseFloat(progress.replace("%", ''))} max='100' />
</p> </p>
<p className="animate-pulse rounded-full px-2 pb-3 text-sm font-medium"> <p className="animate-pulse rounded-full px-2 pb-3 text-sm font-medium">