2022-11-11 21:39:28 +01:00
|
|
|
import React from "react";
|
2023-07-22 13:07:53 +02:00
|
|
|
import Spinner from "../../icons/Spinner";
|
2022-11-11 21:39:28 +01:00
|
|
|
|
2023-07-23 11:07:18 +02:00
|
|
|
function ProgressBar({
|
|
|
|
progress,
|
|
|
|
doubleUpscaylCounter,
|
|
|
|
stopHandler,
|
|
|
|
batchMode,
|
|
|
|
}) {
|
2022-11-11 21:39:28 +01:00
|
|
|
return (
|
2023-03-12 08:59:07 +01:00
|
|
|
<div className="absolute flex h-full w-full flex-col items-center justify-center bg-base-300/50 backdrop-blur-lg">
|
2022-11-11 21:39:28 +01:00
|
|
|
<div className="flex flex-col items-center gap-2">
|
2023-03-12 08:59:07 +01:00
|
|
|
<Spinner />
|
2023-03-12 09:40:16 +01:00
|
|
|
<p className="rounded-full bg-base-300 px-2 py-1 font-bold">
|
2023-07-23 11:07:18 +02:00
|
|
|
{batchMode && "In Progress"}
|
|
|
|
{!batchMode &&
|
|
|
|
(doubleUpscaylCounter > 0
|
|
|
|
? `${progress}\nPass ${doubleUpscaylCounter}`
|
|
|
|
: `${progress}`)}
|
2022-11-11 21:39:28 +01:00
|
|
|
</p>
|
2023-03-12 08:59:07 +01:00
|
|
|
<p className="rounded-full bg-base-300 px-2 py-1 text-sm font-medium">
|
|
|
|
Doing the Upscayl magic...
|
|
|
|
</p>
|
2023-08-12 17:56:05 +02:00
|
|
|
<button onClick={stopHandler} className="btn-danger btn">
|
2023-04-29 19:12:40 +02:00
|
|
|
STOP
|
|
|
|
</button>
|
2022-11-11 21:39:28 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ProgressBar;
|