Add "alt" tags to images

Remove unused code
This commit is contained in:
glax 2024-10-20 20:24:52 +02:00
parent 5e4e64f019
commit fc3fa627c1

View File

@ -1,8 +1,7 @@
import IMangaConnector from "./IMangaConnector";
import KeyValuePair from "./KeyValuePair";
import {Manga} from "../Manga";
import React, {EventHandler, ReactElement} from "react";
import {Job} from "../Job";
import React, {ReactElement} from "react";
import Icon from '@mdi/react';
import { mdiTagTextOutline, mdiAccountEdit } from '@mdi/js';
import MarkdownPreview from '@uiw/react-markdown-preview';
@ -43,7 +42,7 @@ export function ReleaseStatusFromNumber(n: number): string {
export function CoverCard(apiUri: string, manga: IManga) : ReactElement {
return(
<div className="Manga" key={manga.internalId}>
<img src={Manga.GetMangaCoverUrl(apiUri, manga.internalId)}></img>
<img src={Manga.GetMangaCoverUrl(apiUri, manga.internalId)} alt="Manga Cover"></img>
<div>
<p className="pill connector-name">{manga.mangaConnector.name}</p>
<div className="Manga-status" release-status={ReleaseStatusFromNumber(manga.releaseStatus)}></div>
@ -55,16 +54,16 @@ export function CoverCard(apiUri: string, manga: IManga) : ReactElement {
export function SearchResult(apiUri: string, manga: IManga, createJob: (internalId: string, type: string) => void) : ReactElement {
return(
<div className="SearchResult" key={manga.internalId}>
<img src={Manga.GetMangaCoverUrl(apiUri, manga.internalId)}></img>
<img src={Manga.GetMangaCoverUrl(apiUri, manga.internalId)} alt="Manga Cover"></img>
<p className="connector-name">{manga.mangaConnector.name}</p>
<div className="Manga-status" release-status={ReleaseStatusFromNumber(manga.releaseStatus)}></div>
<p className="Manga-name"><a href={manga.websiteUrl}>{manga.sortName}<img src="../../media/link.svg" /></a></p>
<p className="Manga-name"><a href={manga.websiteUrl}>{manga.sortName}<img src="../../media/link.svg" alt=""/></a></p>
<div className="Manga-tags">
{manga.authors.map(author => <p className="Manga-author" key={manga.internalId + "-author-" + author}> <Icon path={mdiAccountEdit} size={0.5} /> {author}</p>)}
{manga.tags.map(tag => <p className="Manga-tag" key={manga.internalId + "-tag-" + tag}><Icon path={mdiTagTextOutline} size={0.5} /> {tag}</p>)}
</div>
<MarkdownPreview className="Manga-description" source={manga.description} style={{ backgroundColor: "transparent", color: "black" }} />
<button className="Manga-AddButton" onClick={(e) => {
<button className="Manga-AddButton" onClick={() => {
createJob(manga.internalId, "MonitorManga")
}}>Monitor
</button>