mirror of
https://github.com/upscayl/upscayl.git
synced 2025-02-17 11:18:36 +01:00
Update counter
This commit is contained in:
parent
6a7a3097db
commit
8ed3f4673c
@ -37,7 +37,6 @@ export function ThemeSelect() {
|
||||
<div className="flex flex-col gap-2">
|
||||
<p className="text-sm font-medium">UPSCAYL THEME</p>
|
||||
<select data-choose-theme className="select-primary select">
|
||||
<option value="upscayl">Default</option>
|
||||
{availableThemes.map((theme) => {
|
||||
return (
|
||||
<option value={theme.value} key={theme.value}>
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React from "react";
|
||||
import React, { useEffect } from "react";
|
||||
import Spinner from "../../icons/Spinner";
|
||||
|
||||
function ProgressBar({
|
||||
@ -14,11 +14,15 @@ function ProgressBar({
|
||||
}) {
|
||||
const [batchProgress, setBatchProgress] = React.useState(0);
|
||||
|
||||
React.useEffect(() => {
|
||||
useEffect(() => {
|
||||
const progressString = progress.trim().replace(/\n/g, "");
|
||||
console.log(
|
||||
"🚀 => file: ProgressBar.tsx:19 => progressString:",
|
||||
progressString
|
||||
);
|
||||
|
||||
// Remove trailing and leading spaces
|
||||
console.log({ progressString });
|
||||
if (progressString.length === 5 && progressString === "0.00%") {
|
||||
if (progressString.includes("Successful")) {
|
||||
setBatchProgress((prev) => prev + 1);
|
||||
}
|
||||
}, [progress]);
|
||||
|
@ -119,6 +119,8 @@ const Home = () => {
|
||||
setProgress(data);
|
||||
} else if (data.includes("converting")) {
|
||||
setProgress("Scaling and converting image...");
|
||||
} else if (data.includes("Successful")) {
|
||||
setProgress("Upscayl done!");
|
||||
}
|
||||
handleErrors(data);
|
||||
logit(`🚧 UPSCAYL_PROGRESS: `, data);
|
||||
|
@ -153,7 +153,7 @@
|
||||
}
|
||||
|
||||
[data-theme="upscayl"] .btn {
|
||||
@apply ring-1 ring-slate-500 font-medium normal-case !min-h-min h-10 py-2 px-3;
|
||||
@apply font-medium normal-case !min-h-min h-10 py-2 px-3;
|
||||
}
|
||||
|
||||
[data-theme="upscayl"] input[type="range"] {
|
||||
@ -161,7 +161,7 @@
|
||||
}
|
||||
|
||||
[data-theme="upscayl"] .react-select-container .react-select__control {
|
||||
@apply ring-1 ring-slate-500 rounded-btn h-10 cursor-pointer !border-0 !border-none !border-transparent bg-primary shadow-none;
|
||||
@apply rounded-btn h-10 cursor-pointer !border-0 !border-none !border-transparent bg-primary shadow-none;
|
||||
}
|
||||
|
||||
[data-theme="upscayl"] .react-select-container .react-select__single-value {
|
||||
|
Loading…
x
Reference in New Issue
Block a user