pstream is dead; long live pstream taciturnaxolotl.github.io/pstream-ng/
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #710 from movie-web/warningpart

Create WarningPart for in-player use

authored by

mrjvs and committed by
GitHub
1912af06 67de5030

+17 -11
+3 -11
src/pages/parts/player/ScrapingPart.tsx
··· 9 9 scrapePartsToProviderMetric, 10 10 useReportProviders, 11 11 } from "@/backend/helpers/report"; 12 - import { Icon, Icons } from "@/components/Icon"; 13 12 import { Loading } from "@/components/layout/Loading"; 14 13 import { 15 14 ScrapeCard, ··· 21 20 useListCenter, 22 21 useScrape, 23 22 } from "@/hooks/useProviderScrape"; 24 - import { LargeTextPart } from "@/pages/parts/util/LargeTextPart"; 23 + 24 + import { WarningPart } from "../util/WarningPart"; 25 25 26 26 export interface ScrapingProps { 27 27 media: ScrapeMedia; ··· 88 88 currentProviderIndex = sourceOrder.length - 1; 89 89 90 90 if (failedStartScrape) 91 - return ( 92 - <LargeTextPart 93 - iconSlot={ 94 - <Icon className="text-type-danger text-2xl" icon={Icons.WARNING} /> 95 - } 96 - > 97 - {t("player.turnstile.error")} 98 - </LargeTextPart> 99 - ); 91 + return <WarningPart>{t("player.turnstile.error")}</WarningPart>; 100 92 101 93 return ( 102 94 <div
+14
src/pages/parts/util/WarningPart.tsx
··· 1 + import { Icon, Icons } from "@/components/Icon"; 2 + import { BlurEllipsis } from "@/pages/layouts/SubPageLayout"; 3 + 4 + export function WarningPart(props: { children: React.ReactNode }) { 5 + return ( 6 + <div className="flex flex-col justify-center items-center h-screen text-center font-medium"> 7 + <BlurEllipsis /> 8 + <Icon className="text-type-danger text-2xl" icon={Icons.WARNING} /> 9 + <div className="max-w-[19rem] mt-3 mb-12 text-type-secondary"> 10 + {props.children} 11 + </div> 12 + </div> 13 + ); 14 + }