From 7364a20d5df4e10320eba107986678acb4396b55 Mon Sep 17 00:00:00 2001 From: glax Date: Sun, 20 Oct 2024 21:20:18 +0200 Subject: [PATCH] Add Progressbar to jobs Add Cancel-Buttons to running jobs Auto-update Queue --- Website/modules/Footer.tsx | 8 ++-- Website/modules/QueuePopUp.tsx | 47 +++++++++++-------- Website/modules/interfaces/IManga.tsx | 32 +++++++++++++ Website/modules/interfaces/IProgressToken.tsx | 13 ++++- Website/styles/queuePopUp.css | 30 ++++++++++-- package-lock.json | 11 +++++ package.json | 1 + 7 files changed, 114 insertions(+), 28 deletions(-) diff --git a/Website/modules/Footer.tsx b/Website/modules/Footer.tsx index da9299a..b230400 100644 --- a/Website/modules/Footer.tsx +++ b/Website/modules/Footer.tsx @@ -10,7 +10,7 @@ export default function Footer({connectedToBackend, apiUri} : {connectedToBacken const [AllJobsCount, setAllJobsCount] = React.useState(0); const [RunningJobsCount, setRunningJobsCount] = React.useState(0); const [StandbyJobsCount, setStandbyJobsCount] = React.useState(0); - const [countUpdateInterval, setcountUpdateInterval] = React.useState(); + const [countUpdateInterval, setCountUpdateInterval] = React.useState(); function UpdateBackendState(){ Job.GetMonitoringJobs(apiUri).then((jobs) => setMonitoringJobsCount(jobs.length)); @@ -22,19 +22,19 @@ export default function Footer({connectedToBackend, apiUri} : {connectedToBacken useEffect(() => { if(connectedToBackend){ UpdateBackendState(); - setcountUpdateInterval(setInterval(() => { + setCountUpdateInterval(setInterval(() => { UpdateBackendState(); }, 2000)); }else{ clearInterval(countUpdateInterval); - setcountUpdateInterval(undefined); + setCountUpdateInterval(undefined); } }, [connectedToBackend]); return (