import IMangaConnector from "./IMangaConnector"; import KeyValuePair from "./KeyValuePair"; 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 ProgressBar from "@ramonak/react-progress-bar"; export default interface IManga{ "sortName": string, "authors": string[], "altTitles": KeyValuePair[], "description": string, "tags": string[], "coverUrl": string, "coverFileNameInCache": string, "links": KeyValuePair[], "year": number, "originalLanguage": string, "releaseStatus": number, "folderName": string, "publicationId": string, "internalId": string, "ignoreChaptersBelow": number, "latestChapterDownloaded": number, "latestChapterAvailable": number, "websiteUrl": string, "mangaConnector": IMangaConnector } export function ReleaseStatusFromNumber(n: number): string { switch(n) { case 0: return "Ongoing"; case 1: return "Completed"; case 2: return "OnHiatus"; case 3: return "Cancelled"; case 4: return "Unreleased"; } return ""; } export function CoverCard(apiUri: string, manga: IManga) : ReactElement { return(
{manga.mangaConnector.name}
{manga.sortName}
{manga.mangaConnector.name}
{manga.sortName}
{JobTypeFromNumber(job.jobType)}
{job.jobType == 0 ? `Vol.${job.chapter?.volumeNumber} Ch.${job.chapter?.chapterNumber}` : ""}
{job.progressToken.state === 0 ?