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

{manga.mangaConnector.name}

{manga.sortName}

); } export function SearchResult(apiUri: string, manga: IManga, createJob: (internalId: string, type: string) => void) : ReactElement { return(
Manga Cover

{manga.mangaConnector.name}

{manga.sortName}

{manga.authors.map(author =>

{author}

)} {manga.tags.map(tag =>

{tag}

)}
); }