mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Format front
This commit is contained in:
parent
f438e80d3a
commit
f536713f04
@ -21,7 +21,7 @@
|
|||||||
import "../polyfill";
|
import "../polyfill";
|
||||||
|
|
||||||
import { HydrationBoundary, QueryClientProvider } from "@tanstack/react-query";
|
import { HydrationBoundary, QueryClientProvider } from "@tanstack/react-query";
|
||||||
import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
|
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
||||||
import { HiddenIfNoJs, SkeletonCss, ThemeSelector } from "@kyoo/primitives";
|
import { HiddenIfNoJs, SkeletonCss, ThemeSelector } from "@kyoo/primitives";
|
||||||
import { WebTooltip } from "@kyoo/primitives/src/tooltip.web";
|
import { WebTooltip } from "@kyoo/primitives/src/tooltip.web";
|
||||||
import {
|
import {
|
||||||
|
@ -36,8 +36,8 @@ const kyooUrl =
|
|||||||
Platform.OS !== "web"
|
Platform.OS !== "web"
|
||||||
? process.env.PUBLIC_BACK_URL
|
? process.env.PUBLIC_BACK_URL
|
||||||
: typeof window === "undefined"
|
: typeof window === "undefined"
|
||||||
? process.env.KYOO_URL ?? "http://localhost:5000"
|
? process.env.KYOO_URL ?? "http://localhost:5000"
|
||||||
: "/api";
|
: "/api";
|
||||||
|
|
||||||
export let kyooApiUrl: string | null = kyooUrl || null;
|
export let kyooApiUrl: string | null = kyooUrl || null;
|
||||||
|
|
||||||
@ -71,8 +71,8 @@ export const queryFn = async <Data,>(
|
|||||||
"path" in context
|
"path" in context
|
||||||
? (context.path.filter((x) => x) as string[])
|
? (context.path.filter((x) => x) as string[])
|
||||||
: "pageParam" in context && context.pageParam
|
: "pageParam" in context && context.pageParam
|
||||||
? [context.pageParam as string]
|
? [context.pageParam as string]
|
||||||
: (context.queryKey.filter((x) => x) as string[]),
|
: (context.queryKey.filter((x) => x) as string[]),
|
||||||
)
|
)
|
||||||
.join("/")
|
.join("/")
|
||||||
.replace("/?", "?");
|
.replace("/?", "?");
|
||||||
|
@ -499,7 +499,9 @@ export const Header = ({
|
|||||||
{...(data.watchStatus as ShowWatchStatus).nextEpisode!}
|
{...(data.watchStatus as ShowWatchStatus).nextEpisode!}
|
||||||
watchedPercent={data.watchStatus?.watchedPercent || null}
|
watchedPercent={data.watchStatus?.watchedPercent || null}
|
||||||
watchedStatus={data.watchStatus?.status || null}
|
watchedStatus={data.watchStatus?.status || null}
|
||||||
displayNumber={episodeDisplayNumber((data.watchStatus as ShowWatchStatus).nextEpisode!)!}
|
displayNumber={
|
||||||
|
episodeDisplayNumber((data.watchStatus as ShowWatchStatus).nextEpisode!)!
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</Container>
|
</Container>
|
||||||
)}
|
)}
|
||||||
|
@ -83,12 +83,7 @@ export const GenreGrid = ({ genre }: { genre: Genre }) => {
|
|||||||
{(x, i) => {
|
{(x, i) => {
|
||||||
// only display empty list if a loading as been displayed (not durring ssr)
|
// only display empty list if a loading as been displayed (not durring ssr)
|
||||||
if (x.isLoading) displayEmpty.current = true;
|
if (x.isLoading) displayEmpty.current = true;
|
||||||
return (
|
return <ItemGrid key={x.id ?? i} {...itemMap(x)} />;
|
||||||
<ItemGrid
|
|
||||||
key={x.id ?? i}
|
|
||||||
{...itemMap(x)}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}}
|
}}
|
||||||
</InfiniteFetchList>
|
</InfiniteFetchList>
|
||||||
</>
|
</>
|
||||||
|
@ -89,7 +89,11 @@ export const WatchlistList = () => {
|
|||||||
) : (
|
) : (
|
||||||
<View {...css({ justifyContent: "center", alignItems: "center" })}>
|
<View {...css({ justifyContent: "center", alignItems: "center" })}>
|
||||||
<P>{t("home.watchlistLogin")}</P>
|
<P>{t("home.watchlistLogin")}</P>
|
||||||
<Button text={t("login.login")} href={"/login"} {...css({ minWidth: ts(24), margin: ts(2) })}/>
|
<Button
|
||||||
|
text={t("login.login")}
|
||||||
|
href={"/login"}
|
||||||
|
{...css({ minWidth: ts(24), margin: ts(2) })}
|
||||||
|
/>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
@ -68,7 +68,7 @@ export const WatchStatusObserver = ({
|
|||||||
// update watch status when play status change (and on mount).
|
// update watch status when play status change (and on mount).
|
||||||
const isPlaying = useAtomValue(playAtom);
|
const isPlaying = useAtomValue(playAtom);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
mutate(readProgress())
|
mutate(readProgress());
|
||||||
}, [type, slug, isPlaying, readProgress, mutate])
|
}, [type, slug, isPlaying, readProgress, mutate]);
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user