diff --git a/Website/modules/Footer.tsx b/Website/modules/Footer.tsx index b230400..32e864d 100644 --- a/Website/modules/Footer.tsx +++ b/Website/modules/Footer.tsx @@ -1,6 +1,6 @@ import React, {useEffect} from 'react'; import '../styles/footer.css'; -import {Job} from './Job'; +import Job from './Job'; import Icon from '@mdi/react'; import { mdiRun, mdiCounter, mdiEyeCheck, mdiTrayFull } from '@mdi/js'; import QueuePopUp from "./QueuePopUp"; diff --git a/Website/modules/Job.tsx b/Website/modules/Job.tsx index a0bc4b8..984dda7 100644 --- a/Website/modules/Job.tsx +++ b/Website/modules/Job.tsx @@ -2,7 +2,7 @@ import {deleteData, getData, postData} from '../App'; import IJob from "./interfaces/IJob"; import IProgressToken from "./interfaces/IProgressToken"; -export class Job +export default class Job { static IntervalStringFromDate(date: Date) : string { return `${date.getDay()}.${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`; diff --git a/Website/modules/Manga.tsx b/Website/modules/Manga.tsx index ac6bec3..65bb734 100644 --- a/Website/modules/Manga.tsx +++ b/Website/modules/Manga.tsx @@ -1,7 +1,7 @@ import IManga from './interfaces/IManga'; import { getData } from '../App'; -export class Manga +export default class Manga { static async GetAllManga(apiUri: string): Promise { //console.info("Getting all Manga"); diff --git a/Website/modules/MonitorJobsList.tsx b/Website/modules/MonitorJobsList.tsx index fb949a9..2d1c11b 100644 --- a/Website/modules/MonitorJobsList.tsx +++ b/Website/modules/MonitorJobsList.tsx @@ -1,9 +1,9 @@ import React, {EventHandler, MouseEventHandler, ReactElement, useEffect, useState} from 'react'; -import {Job} from './Job'; +import Job from './Job'; import '../styles/monitorMangaList.css'; import IJob from "./interfaces/IJob"; import IManga, {CoverCard} from "./interfaces/IManga"; -import {Manga} from './Manga'; +import Manga from './Manga'; import '../styles/MangaCoverCard.css' import Icon from '@mdi/react'; import { mdiTrashCanOutline, mdiPlayBoxOutline } from '@mdi/js'; diff --git a/Website/modules/QueuePopUp.tsx b/Website/modules/QueuePopUp.tsx index 480d349..864fc83 100644 --- a/Website/modules/QueuePopUp.tsx +++ b/Website/modules/QueuePopUp.tsx @@ -2,9 +2,9 @@ import React, {useEffect, useState} from 'react'; import IJob from "./interfaces/IJob"; import '../styles/queuePopUp.css'; import '../styles/popup.css'; -import {Job} from "./Job"; +import Job from "./Job"; import IManga, {QueueItem} from "./interfaces/IManga"; -import {Manga} from "./Manga"; +import Manga from "./Manga"; export default function QueuePopUp({connectedToBackend, children, apiUri} : {connectedToBackend: boolean, children: JSX.Element[], apiUri: string}) { @@ -35,24 +35,24 @@ export default function QueuePopUp({connectedToBackend, children, apiUri} : {con function UpdateMonitoringJobsList(){ Job.GetStandbyJobs(apiUri) - .then((jobs) => { + .then((jobs:string[]) => { if(jobs.length > 0) return Job.GetJobs(apiUri, jobs); return []; }) - .then((jobs) => { + .then((jobs:IJob[]) => { //console.debug("Removing Metadata Jobs"); //console.log(StandbyJobs) setStandbyJobs(jobs.filter(job => job.jobType <= 1)); //console.log(StandbyJobs) }); Job.GetRunningJobs(apiUri) - .then((jobs) => { + .then((jobs:string[]) => { if(jobs.length > 0) return Job.GetJobs(apiUri, jobs); return []; }) - .then((jobs) =>{ + .then((jobs:IJob[]) =>{ //console.debug("Removing Metadata Jobs"); setRunningJobs(jobs.filter(job => job.jobType <= 1)); }); diff --git a/Website/modules/interfaces/IManga.tsx b/Website/modules/interfaces/IManga.tsx index 11389ef..ed7c194 100644 --- a/Website/modules/interfaces/IManga.tsx +++ b/Website/modules/interfaces/IManga.tsx @@ -1,12 +1,12 @@ import IMangaConnector from "./IMangaConnector"; import KeyValuePair from "./KeyValuePair"; -import {Manga} from "../Manga"; +import Manga from "../Manga"; import React, {ReactElement} from "react"; import Icon from '@mdi/react'; import { mdiTagTextOutline, mdiAccountEdit } from '@mdi/js'; import MarkdownPreview from '@uiw/react-markdown-preview'; import IJob, {JobTypeFromNumber} from "./IJob"; -import {Job} from "../Job"; +import Job from "../Job"; import ProgressBar from "@ramonak/react-progress-bar"; export default interface IManga{