Fix default export of Manga and Job classes

This commit is contained in:
glax 2024-10-22 18:51:34 +02:00
parent c525957b2e
commit 3cd64b9bfb
6 changed files with 13 additions and 13 deletions

View File

@ -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";

View File

@ -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()}`;

View File

@ -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<IManga[]> {
//console.info("Getting all Manga");

View File

@ -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';

View File

@ -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));
});

View File

@ -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{