import IMangaConnector from "./IMangaConnector"; import KeyValuePair from "./KeyValuePair"; import {Manga} from "../Manga"; import React, {ChangeEventHandler, EventHandler, ReactElement} from "react"; import {Job} from "../Job"; import Icon from '@mdi/react'; import { mdiTagTextOutline, mdiAccountEdit } from '@mdi/js'; 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 } 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(manga: IManga) : ReactElement { return(

{manga.mangaConnector.name}

{manga.sortName}

); } export function SearchResult(manga: IManga, jobsChanged: EventHandler) : ReactElement { return(

{manga.mangaConnector.name}

{manga.sortName}

{manga.description}

); }