Fixed a few things

This commit is contained in:
DrMint 2022-07-16 00:14:08 +02:00
parent 9a3d76a356
commit 89f4168e72
9 changed files with 239 additions and 386 deletions

View File

@ -52,7 +52,7 @@ export const Button = ({
<div <div
className="relative" className="relative"
onClick={() => { onClick={() => {
if (isDefined(href) || isDefined(locale)) { if (!isDefined(target) && (isDefined(href) || isDefined(locale))) {
router.push(href ?? router.asPath, href, { router.push(href ?? router.asPath, href, {
locale: locale, locale: locale,
}); });

View File

@ -199,8 +199,8 @@ export const Markdawn = ({
Line: { Line: {
component: (compProps) => ( component: (compProps) => (
<> <>
<strong className="text-dark opacity-60 mobile:!-mb-4"> <strong className="text-dark/60 mobile:!-mb-4 !my-0">
{compProps.name} <Markdawn text={compProps.name} />
</strong> </strong>
<p className="whitespace-pre-line">{compProps.children}</p> <p className="whitespace-pre-line">{compProps.children}</p>
</> </>
@ -427,11 +427,17 @@ enum HeaderLevels {
const preprocessMarkDawn = (text: string, playerName = ""): string => { const preprocessMarkDawn = (text: string, playerName = ""): string => {
if (!text) return ""; if (!text) return "";
const processedPlayerName = playerName
.replaceAll("_", "\\_")
.replaceAll("*", "\\*");
let preprocessed = text let preprocessed = text
.replaceAll("--", "—") .replaceAll("--", "—")
.replaceAll( .replaceAll(
"@player", "@player",
isDefinedAndNotEmpty(playerName) ? playerName : "(player)" isDefinedAndNotEmpty(processedPlayerName)
? processedPlayerName
: "(player)"
); );
console.log(); console.log();

View File

@ -39,7 +39,7 @@ export const PreviewLine = ({
> >
{thumbnail ? ( {thumbnail ? (
<div className="aspect-[3/2] h-full"> <div className="aspect-[3/2] h-full">
<Img image={thumbnail} quality={ImageQuality.Medium} /> <Img className="h-full object-cover" image={thumbnail} quality={ImageQuality.Medium} />
</div> </div>
) : ( ) : (
<div style={{ aspectRatio: thumbnailAspectRatio }}></div> <div style={{ aspectRatio: thumbnailAspectRatio }}></div>

View File

@ -24,6 +24,9 @@ query devGetContents {
language { language {
data { data {
id id
attributes {
code
}
} }
} }
title title
@ -32,6 +35,9 @@ query devGetContents {
source_language { source_language {
data { data {
id id
attributes {
code
}
} }
} }
status status

View File

@ -0,0 +1,23 @@
export type Report = {
title: string;
lines: ReportLine[];
};
export type ReportLine = {
subitems: string[];
name: string;
type: "Error" | "Improvement" | "Missing";
severity: Severity;
description: string;
recommandation: string;
backendUrl: string;
frontendUrl: string;
};
export enum Severity {
VeryLow = 0,
Low = 1,
Medium = 2,
High = 3,
VeryHigh = 4,
}

View File

@ -271,7 +271,7 @@ const Contents = ({
keepInfoVisible={keepInfoVisible} keepInfoVisible={keepInfoVisible}
/> />
)} )}
className="grid-cols-2 items-end desktop:grid-cols-[repeat(auto-fill,_minmax(15rem,1fr))]" className="grid-cols-2 desktop:grid-cols-[repeat(auto-fill,_minmax(15rem,1fr))]"
groupingFunction={groupingFunction} groupingFunction={groupingFunction}
filteringFunction={filteringFunction} filteringFunction={filteringFunction}
searchingTerm={searchName} searchingTerm={searchName}

View File

@ -12,6 +12,7 @@ import { DevGetContentsQuery } from "graphql/generated";
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getReadySdk } from "graphql/sdk"; import { getReadySdk } from "graphql/sdk";
import { filterDefined, filterHasAttributes } from "helpers/others"; import { filterDefined, filterHasAttributes } from "helpers/others";
import { Report, Severity } from "helpers/types/Report";
/* /*
* *
@ -23,7 +24,7 @@ interface Props extends AppStaticProps {
} }
const CheckupContents = ({ contents, ...otherProps }: Props): JSX.Element => { const CheckupContents = ({ contents, ...otherProps }: Props): JSX.Element => {
const testReport = testingContent(contents); const testReport = useMemo(() => testingContent(contents), [contents]);
const contentPanel = useMemo( const contentPanel = useMemo(
() => ( () => (
@ -40,7 +41,10 @@ const CheckupContents = ({ contents, ...otherProps }: Props): JSX.Element => {
<p className="font-headers">Description</p> <p className="font-headers">Description</p>
</div> </div>
{testReport.lines.map((line, index) => ( {testReport.lines
.sort((a, b) => a.name.localeCompare(b.name))
.sort((a, b) => b.severity - a.severity)
.map((line, index) => (
<div <div
key={index} key={index}
className="mb-2 grid grid-cols-[2em,3em,2fr,1fr,0.5fr,0.5fr,2fr] items-center className="mb-2 grid grid-cols-[2em,3em,2fr,1fr,0.5fr,0.5fr,2fr] items-center
@ -63,15 +67,15 @@ const CheckupContents = ({ contents, ...otherProps }: Props): JSX.Element => {
<Chip text={line.type} /> <Chip text={line.type} />
<Chip <Chip
className={ className={
line.severity === "Very High" line.severity === Severity.VeryHigh
? "bg-[#f00] font-bold !opacity-100" ? "bg-[#f00] font-bold !opacity-100"
: line.severity === "High" : line.severity === Severity.High
? "bg-[#ff6600] font-bold !opacity-100" ? "bg-[#ff6600] font-bold !opacity-100"
: line.severity === "Medium" : line.severity === Severity.Medium
? "bg-[#fff344] !opacity-100" ? "bg-[#fff344] !opacity-100"
: "" : ""
} }
text={line.severity} text={Severity[line.severity]}
/> />
<ToolTip content={line.recommandation} placement="left"> <ToolTip content={line.recommandation} placement="left">
<p>{line.description}</p> <p>{line.description}</p>
@ -115,22 +119,6 @@ export const getStaticProps: GetStaticProps = async (context) => {
* PRIVATE METHODS * PRIVATE METHODS
*/ */
type Report = {
title: string;
lines: ReportLine[];
};
type ReportLine = {
subitems: string[];
name: string;
type: "Error" | "Improvement" | "Missing";
severity: "High" | "Low" | "Medium" | "Very High" | "Very Low";
description: string;
recommandation: string;
backendUrl: string;
frontendUrl: string;
};
const testingContent = (contents: Props["contents"]): Report => { const testingContent = (contents: Props["contents"]): Report => {
const report: Report = { const report: Report = {
title: "Contents", title: "Contents",
@ -147,7 +135,7 @@ const testingContent = (contents: Props["contents"]): Report => {
subitems: [content.attributes.slug], subitems: [content.attributes.slug],
name: "No Category", name: "No Category",
type: "Missing", type: "Missing",
severity: "Medium", severity: Severity.High,
description: "The Content has no Category.", description: "The Content has no Category.",
recommandation: "Select a Category in relation with the Content", recommandation: "Select a Category in relation with the Content",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -158,9 +146,9 @@ const testingContent = (contents: Props["contents"]): Report => {
if (!content.attributes.type?.data?.id) { if (!content.attributes.type?.data?.id) {
report.lines.push({ report.lines.push({
subitems: [content.attributes.slug], subitems: [content.attributes.slug],
name: "No Category", name: "No Type",
type: "Missing", type: "Missing",
severity: "Medium", severity: Severity.High,
description: "The Content has no Type.", description: "The Content has no Type.",
recommandation: 'If unsure, use the "Other" Type.', recommandation: 'If unsure, use the "Other" Type.',
backendUrl: backendUrl, backendUrl: backendUrl,
@ -173,7 +161,7 @@ const testingContent = (contents: Props["contents"]): Report => {
subitems: [content.attributes.slug], subitems: [content.attributes.slug],
name: "No Ranged Content", name: "No Ranged Content",
type: "Improvement", type: "Improvement",
severity: "Low", severity: Severity.Low,
description: "The Content has no Ranged Content.", description: "The Content has no Ranged Content.",
recommandation: recommandation:
"If this Content is available in one or multiple Library Item(s), create a Range Content to connect the Content to its Library Item(s).", "If this Content is available in one or multiple Library Item(s), create a Range Content to connect the Content to its Library Item(s).",
@ -187,7 +175,7 @@ const testingContent = (contents: Props["contents"]): Report => {
subitems: [content.attributes.slug], subitems: [content.attributes.slug],
name: "No Thumbnail", name: "No Thumbnail",
type: "Missing", type: "Missing",
severity: "High", severity: Severity.High,
description: "The Content has no Thumbnail.", description: "The Content has no Thumbnail.",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -200,7 +188,7 @@ const testingContent = (contents: Props["contents"]): Report => {
subitems: [content.attributes.slug], subitems: [content.attributes.slug],
name: "No Titles", name: "No Titles",
type: "Missing", type: "Missing",
severity: "High", severity: Severity.High,
description: "The Content has no Titles.", description: "The Content has no Titles.",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -209,6 +197,10 @@ const testingContent = (contents: Props["contents"]): Report => {
} else { } else {
const titleLanguages: string[] = []; const titleLanguages: string[] = [];
if (
content.attributes.translations &&
content.attributes.translations.length > 0
) {
filterDefined(content.attributes.translations).map( filterDefined(content.attributes.translations).map(
(translation, titleIndex) => { (translation, titleIndex) => {
if (translation.language?.data?.id) { if (translation.language?.data?.id) {
@ -220,7 +212,7 @@ const testingContent = (contents: Props["contents"]): Report => {
], ],
name: "Duplicate Language", name: "Duplicate Language",
type: "Error", type: "Error",
severity: "High", severity: Severity.High,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -237,7 +229,7 @@ const testingContent = (contents: Props["contents"]): Report => {
], ],
name: "No Language", name: "No Language",
type: "Error", type: "Error",
severity: "Very High", severity: Severity.VeryHigh,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -252,7 +244,7 @@ const testingContent = (contents: Props["contents"]): Report => {
], ],
name: "No Description", name: "No Description",
type: "Missing", type: "Missing",
severity: "Medium", severity: Severity.Medium,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -260,197 +252,35 @@ const testingContent = (contents: Props["contents"]): Report => {
}); });
} }
if (translation.text_set) { if (!translation.text_set) {
report.lines.push({ report.lines.push({
subitems: [content.attributes.slug], subitems: [
content.attributes.slug,
translation.language?.data?.attributes?.code ?? "",
],
name: "No Text Set", name: "No Text Set",
type: "Missing", type: "Missing",
severity: "Medium", severity: Severity.High,
description: "The Content has no Text Set.", description: "The Content has no Text Set.",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
frontendUrl: frontendUrl, frontendUrl: frontendUrl,
}); });
} else {
/*
*const textSetLanguages: string[] = [];
*if (content.attributes && textSet) {
* if (textSet.language?.data?.id) {
* if (textSet.language.data.id in textSetLanguages) {
* report.lines.push({
* subitems: [
* content.attributes.slug,
* `TextSet ${textSetIndex.toString()}`,
* ],
* name: "Duplicate Language",
* type: "Error",
* severity: "High",
* description: "",
* recommandation: "",
* backendUrl: backendUrl,
* frontendUrl: frontendUrl,
* });
* } else {
* textSetLanguages.push(textSet.language.data.id);
* }
* } else {
* report.lines.push({
* subitems: [
* content.attributes.slug,
* `TextSet ${textSetIndex.toString()}`,
* ],
* name: "No Language",
* type: "Error",
* severity: "Very High",
* description: "",
* recommandation: "",
* backendUrl: backendUrl,
* frontendUrl: frontendUrl,
* });
* }
*
* if (!textSet.source_language?.data?.id) {
* report.lines.push({
* subitems: [
* content.attributes.slug,
* `TextSet ${textSetIndex.toString()}`,
* ],
* name: "No Source Language",
* type: "Error",
* severity: "High",
* description: "",
* recommandation: "",
* backendUrl: backendUrl,
* frontendUrl: frontendUrl,
* });
* }
*
* if (textSet.status !== Enum_Componentsetstextset_Status.Done) {
* report.lines.push({
* subitems: [
* content.attributes.slug,
* `TextSet ${textSetIndex.toString()}`,
* ],
* name: "Not Done Status",
* type: "Improvement",
* severity: "Low",
* description: "",
* recommandation: "",
* backendUrl: backendUrl,
* frontendUrl: frontendUrl,
* });
* }
*
* if (!textSet.text || textSet.text.length < 10) {
* report.lines.push({
* subitems: [
* content.attributes.slug,
* `TextSet ${textSetIndex.toString()}`,
* ],
* name: "No Text",
* type: "Missing",
* severity: "Medium",
* description: "",
* recommandation: "",
* backendUrl: backendUrl,
* frontendUrl: frontendUrl,
* });
* }
*
* if (
* textSet.source_language?.data?.id ===
* textSet.language?.data?.id
* ) {
* if (textSet.transcribers?.data.length === 0) {
* report.lines.push({
* subitems: [
* content.attributes.slug,
* `TextSet ${textSetIndex.toString()}`,
* ],
* name: "No Transcribers",
* type: "Missing",
* severity: "High",
* description:
* "The Content is a Transcription but doesn't credit any Transcribers.",
* recommandation: "Add the appropriate Transcribers.",
* backendUrl: backendUrl,
* frontendUrl: frontendUrl,
* });
* }
* if (
* textSet.translators?.data &&
* textSet.translators.data.length > 0
* ) {
* report.lines.push({
* subitems: [
* content.attributes.slug,
* `TextSet ${textSetIndex.toString()}`,
* ],
* name: "Credited Translators",
* type: "Error",
* severity: "High",
* description:
* "The Content is a Transcription but credits one or more Translators.",
* recommandation:
* "If appropriate, create a Translation Text Set with the Translator credited there.",
* backendUrl: backendUrl,
* frontendUrl: frontendUrl,
* });
* }
* } else {
* if (textSet.translators?.data.length === 0) {
* report.lines.push({
* subitems: [
* content.attributes.slug,
* `TextSet ${textSetIndex.toString()}`,
* ],
* name: "No Translators",
* type: "Missing",
* severity: "High",
* description:
* "The Content is a Transcription but doesn't credit any Translators.",
* recommandation: "Add the appropriate Translators.",
* backendUrl: backendUrl,
* frontendUrl: frontendUrl,
* });
* }
* if (
* textSet.transcribers?.data &&
* textSet.transcribers.data.length > 0
* ) {
* report.lines.push({
* subitems: [
* content.attributes.slug,
* `TextSet ${textSetIndex.toString()}`,
* ],
* name: "Credited Transcribers",
* type: "Error",
* severity: "High",
* description:
* "The Content is a Translation but credits one or more Transcribers.",
* recommandation:
* "If appropriate, create a Transcription Text Set with the Transcribers credited there.",
* backendUrl: backendUrl,
* frontendUrl: frontendUrl,
* });
* }
* }
*}
*/
} }
}
);
} else {
report.lines.push({ report.lines.push({
subitems: [content.attributes.slug], subitems: [content.attributes.slug],
name: "No Sets", name: "No Translations",
type: "Missing", type: "Missing",
severity: "Medium", severity: Severity.High,
description: "The Content has no Sets.", description: "The Content has no Translations.",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
frontendUrl: frontendUrl, frontendUrl: frontendUrl,
}); });
} }
);
} }
} }
); );

View File

@ -14,6 +14,7 @@ import {
} from "graphql/generated"; } from "graphql/generated";
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps"; import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getReadySdk } from "graphql/sdk"; import { getReadySdk } from "graphql/sdk";
import { Report, Severity } from "helpers/types/Report";
/* /*
* *
@ -45,7 +46,10 @@ const CheckupLibraryItems = ({
<p className="font-headers">Description</p> <p className="font-headers">Description</p>
</div> </div>
{testReport.lines.map((line, index) => ( {testReport.lines
.sort((a, b) => a.name.localeCompare(b.name))
.sort((a, b) => b.severity - a.severity)
.map((line, index) => (
<div <div
key={index} key={index}
className="mb-2 grid className="mb-2 grid
@ -68,15 +72,15 @@ const CheckupLibraryItems = ({
<Chip text={line.type} /> <Chip text={line.type} />
<Chip <Chip
className={ className={
line.severity === "Very High" line.severity === Severity.VeryHigh
? "bg-[#f00] font-bold !opacity-100" ? "bg-[#f00] font-bold !opacity-100"
: line.severity === "High" : line.severity === Severity.High
? "bg-[#ff6600] font-bold !opacity-100" ? "bg-[#ff6600] font-bold !opacity-100"
: line.severity === "Medium" : line.severity === Severity.Medium
? "bg-[#fff344] !opacity-100" ? "bg-[#fff344] !opacity-100"
: "" : ""
} }
text={line.severity} text={Severity[line.severity]}
/> />
<ToolTip content={line.recommandation} placement="left"> <ToolTip content={line.recommandation} placement="left">
<p>{line.description}</p> <p>{line.description}</p>
@ -120,22 +124,6 @@ export const getStaticProps: GetStaticProps = async (context) => {
* PRIVATE METHODS * PRIVATE METHODS
*/ */
type Report = {
title: string;
lines: ReportLine[];
};
type ReportLine = {
subitems: string[];
name: string;
type: "Error" | "Improvement" | "Missing";
severity: "High" | "Low" | "Medium" | "Very High" | "Very Low";
description: string;
recommandation: string;
backendUrl: string;
frontendUrl: string;
};
const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => { const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
const report: Report = { const report: Report = {
title: "Contents", title: "Contents",
@ -152,7 +140,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
subitems: [item.attributes.slug], subitems: [item.attributes.slug],
name: "No Category", name: "No Category",
type: "Missing", type: "Missing",
severity: "Medium", severity: Severity.High,
description: "The Item has no Category.", description: "The Item has no Category.",
recommandation: "Select a Category in relation with the Item", recommandation: "Select a Category in relation with the Item",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -168,7 +156,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
subitems: [item.attributes.slug], subitems: [item.attributes.slug],
name: "Disconnected Item", name: "Disconnected Item",
type: "Error", type: "Error",
severity: "Very High", severity: Severity.VeryHigh,
description: description:
"The Item is neither a Root Item, nor is it a subitem of another item.", "The Item is neither a Root Item, nor is it a subitem of another item.",
recommandation: "", recommandation: "",
@ -182,7 +170,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
subitems: [item.attributes.slug], subitems: [item.attributes.slug],
name: "No Contents", name: "No Contents",
type: "Missing", type: "Missing",
severity: "Low", severity: Severity.Low,
description: "The Item has no Contents.", description: "The Item has no Contents.",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -195,7 +183,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
subitems: [item.attributes.slug], subitems: [item.attributes.slug],
name: "No Thumbnail", name: "No Thumbnail",
type: "Missing", type: "Missing",
severity: "High", severity: Severity.High,
description: "The Item has no Thumbnail.", description: "The Item has no Thumbnail.",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -208,7 +196,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
subitems: [item.attributes.slug], subitems: [item.attributes.slug],
name: "No Images", name: "No Images",
type: "Missing", type: "Missing",
severity: "Low", severity: Severity.Low,
description: "The Item has no Images.", description: "The Item has no Images.",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -228,7 +216,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "Duplicate Language", name: "Duplicate Language",
type: "Error", type: "Error",
severity: "High", severity: Severity.High,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -245,7 +233,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No Language", name: "No Language",
type: "Error", type: "Error",
severity: "Very High", severity: Severity.VeryHigh,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -261,7 +249,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No Source Language", name: "No Source Language",
type: "Error", type: "Error",
severity: "Very High", severity: Severity.VeryHigh,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -280,7 +268,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "Not Done Status", name: "Not Done Status",
type: "Improvement", type: "Improvement",
severity: "Low", severity: Severity.Low,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -297,7 +285,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No Scanners", name: "No Scanners",
type: "Missing", type: "Missing",
severity: "High", severity: Severity.High,
description: description:
"The Item is a Scan but doesn't credit any Scanners.", "The Item is a Scan but doesn't credit any Scanners.",
recommandation: "Add the appropriate Scanners.", recommandation: "Add the appropriate Scanners.",
@ -313,7 +301,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No Cleaners", name: "No Cleaners",
type: "Missing", type: "Missing",
severity: "High", severity: Severity.High,
description: description:
"The Item is a Scan but doesn't credit any Cleaners.", "The Item is a Scan but doesn't credit any Cleaners.",
recommandation: "Add the appropriate Cleaners.", recommandation: "Add the appropriate Cleaners.",
@ -332,7 +320,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "Credited Typesetters", name: "Credited Typesetters",
type: "Error", type: "Error",
severity: "High", severity: Severity.High,
description: description:
"The Item is a Scan but credits one or more Typesetters.", "The Item is a Scan but credits one or more Typesetters.",
recommandation: recommandation:
@ -350,7 +338,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No Typesetters", name: "No Typesetters",
type: "Missing", type: "Missing",
severity: "High", severity: Severity.High,
description: description:
"The Item is a Scanlation but doesn't credit any Typesetters.", "The Item is a Scanlation but doesn't credit any Typesetters.",
recommandation: "Add the appropriate Typesetters.", recommandation: "Add the appropriate Typesetters.",
@ -366,7 +354,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "Credited Scanners", name: "Credited Scanners",
type: "Error", type: "Error",
severity: "High", severity: Severity.High,
description: description:
"The Item is a Scanlation but credits one or more Scanners.", "The Item is a Scanlation but credits one or more Scanners.",
recommandation: recommandation:
@ -387,7 +375,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No Front", name: "No Front",
type: "Missing", type: "Missing",
severity: "Very High", severity: Severity.VeryHigh,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -403,7 +391,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No spine", name: "No spine",
type: "Missing", type: "Missing",
severity: "Low", severity: Severity.Low,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -419,7 +407,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No Back", name: "No Back",
type: "Missing", type: "Missing",
severity: "High", severity: Severity.High,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -435,7 +423,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No Full", name: "No Full",
type: "Missing", type: "Missing",
severity: "Low", severity: Severity.Low,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -450,7 +438,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No Cover", name: "No Cover",
type: "Missing", type: "Missing",
severity: "Medium", severity: Severity.Medium,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -468,7 +456,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No Front", name: "No Front",
type: "Missing", type: "Missing",
severity: "Very High", severity: Severity.VeryHigh,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -484,7 +472,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No spine", name: "No spine",
type: "Missing", type: "Missing",
severity: "Low", severity: Severity.Low,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -500,7 +488,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No Back", name: "No Back",
type: "Missing", type: "Missing",
severity: "High", severity: Severity.High,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -516,7 +504,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No Full", name: "No Full",
type: "Missing", type: "Missing",
severity: "Low", severity: Severity.Low,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -532,7 +520,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No Flap Front", name: "No Flap Front",
type: "Missing", type: "Missing",
severity: "Medium", severity: Severity.Medium,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -548,7 +536,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No Flap Back", name: "No Flap Back",
type: "Missing", type: "Missing",
severity: "Medium", severity: Severity.Medium,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -563,7 +551,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No Dust Jacket", name: "No Dust Jacket",
type: "Missing", type: "Missing",
severity: "Very Low", severity: Severity.VeryLow,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -581,7 +569,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No Front", name: "No Front",
type: "Missing", type: "Missing",
severity: "Very High", severity: Severity.VeryHigh,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -597,7 +585,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No spine", name: "No spine",
type: "Missing", type: "Missing",
severity: "Low", severity: Severity.Low,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -613,7 +601,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No Back", name: "No Back",
type: "Missing", type: "Missing",
severity: "High", severity: Severity.High,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -629,7 +617,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No Full", name: "No Full",
type: "Missing", type: "Missing",
severity: "Low", severity: Severity.Low,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -645,7 +633,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No Flap Front", name: "No Flap Front",
type: "Missing", type: "Missing",
severity: "Medium", severity: Severity.Medium,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -661,7 +649,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No Flap Back", name: "No Flap Back",
type: "Missing", type: "Missing",
severity: "Medium", severity: Severity.Medium,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -676,7 +664,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No Obi Belt", name: "No Obi Belt",
type: "Missing", type: "Missing",
severity: "Very Low", severity: Severity.VeryLow,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -703,7 +691,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No Text", name: "No Text",
type: "Missing", type: "Missing",
severity: "Very High", severity: Severity.VeryHigh,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -720,7 +708,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "Duplicate Language", name: "Duplicate Language",
type: "Error", type: "Error",
severity: "High", severity: Severity.High,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -737,7 +725,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
], ],
name: "No Language", name: "No Language",
type: "Error", type: "Error",
severity: "Very High", severity: Severity.VeryHigh,
description: "", description: "",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -751,7 +739,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
subitems: [item.attributes.slug], subitems: [item.attributes.slug],
name: "No Description", name: "No Description",
type: "Missing", type: "Missing",
severity: "Medium", severity: Severity.Medium,
description: "The Item has no Description.", description: "The Item has no Description.",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,
@ -764,7 +752,7 @@ const testingLibraryItem = (libraryItems: Props["libraryItems"]): Report => {
subitems: [item.attributes.slug], subitems: [item.attributes.slug],
name: "No URLs", name: "No URLs",
type: "Missing", type: "Missing",
severity: "Very Low", severity: Severity.VeryLow,
description: "The Item has no URLs.", description: "The Item has no URLs.",
recommandation: "", recommandation: "",
backendUrl: backendUrl, backendUrl: backendUrl,

View File

@ -407,7 +407,7 @@ const Editor = ({ langui, ...otherProps }: Props): JSX.Element => {
<h3 className="text-lg">Player&rsquo;s name placeholder</h3> <h3 className="text-lg">Player&rsquo;s name placeholder</h3>
} }
> >
<Button onClick={() => insert("<player>")} icon={Icon.Person} /> <Button onClick={() => insert("@player")} icon={Icon.Person} />
</ToolTip> </ToolTip>
<ToolTip <ToolTip