mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Fix coding style
This commit is contained in:
parent
d7dc66301e
commit
3488aeb03b
@ -77,7 +77,7 @@ namespace Kyoo.Abstractions.Models
|
||||
|
||||
/// <summary>
|
||||
/// The summary of this episode.
|
||||
/// </summay>
|
||||
/// </summary>
|
||||
public string Overview { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -7,8 +7,8 @@
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint",
|
||||
"format": "prettier --check --ignore-path .gitignore .",
|
||||
"format:fix": "prettier --write --ignore-path .gitignore ."
|
||||
"format": "prettier --check --ignore-path .gitignore '!src/utils/jotai-utils.tsx' .",
|
||||
"format:fix": "prettier --write --ignore-path .gitignore '!src/utils/jotai-utils.tsx' ."
|
||||
},
|
||||
"prettier": {
|
||||
"useTabs": true,
|
||||
|
@ -39,7 +39,7 @@ const App = ({ Component, pageProps }: AppProps) => {
|
||||
const [queryClient] = useState(() => createQueryClient());
|
||||
const { queryState, ...props } = superjson.deserialize<any>(pageProps ?? {});
|
||||
const getLayout = (Component as QueryPage).getLayout ?? ((page) => page);
|
||||
|
||||
|
||||
useMobileHover();
|
||||
|
||||
return (
|
||||
|
@ -69,7 +69,9 @@ export const Hover = ({
|
||||
}}
|
||||
>
|
||||
<VideoPoster poster={data?.poster} />
|
||||
<Box sx={{ width: "100%", ml: { xs: 0.5, sm: 3 }, display: "flex", flexDirection: "column" }}>
|
||||
<Box
|
||||
sx={{ width: "100%", ml: { xs: 0.5, sm: 3 }, display: "flex", flexDirection: "column" }}
|
||||
>
|
||||
<Typography variant="h4" component="h2" color="white" sx={{ pb: 1 }}>
|
||||
{name ?? <Skeleton />}
|
||||
</Typography>
|
||||
@ -81,7 +83,12 @@ export const Hover = ({
|
||||
previousSlug={data && !data.isMovie ? data.previousEpisode?.slug : undefined}
|
||||
nextSlug={data && !data.isMovie ? data.nextEpisode?.slug : undefined}
|
||||
/>
|
||||
<RightButtons subtitles={data?.subtitles} fonts={data?.fonts} onMenuOpen={onMenuOpen} onMenuClose={onMenuClose} />
|
||||
<RightButtons
|
||||
subtitles={data?.subtitles}
|
||||
fonts={data?.fonts}
|
||||
onMenuOpen={onMenuOpen}
|
||||
onMenuClose={onMenuClose}
|
||||
/>
|
||||
</Box>
|
||||
</Box>
|
||||
</Box>
|
||||
|
@ -116,7 +116,12 @@ const Player: QueryPage<{ slug: string }> = ({ slug }) => {
|
||||
<meta name="description" content={data.overview ?? undefined} />
|
||||
</Head>
|
||||
)}
|
||||
<MediaSessionManager title={data?.name} image={data?.thumbnail} next={next} previous={previous} />
|
||||
<MediaSessionManager
|
||||
title={data?.name}
|
||||
image={data?.thumbnail}
|
||||
next={next}
|
||||
previous={previous}
|
||||
/>
|
||||
<style jsx global>{`
|
||||
::cue {
|
||||
background-color: transparent;
|
||||
|
@ -32,14 +32,14 @@ export const useMobileHover = () => {
|
||||
const enableHover = () => {
|
||||
if (preventHover) return;
|
||||
document.body.classList.add("hoverEnabled");
|
||||
}
|
||||
};
|
||||
|
||||
const disableHover = () => {
|
||||
if (hoverTimeout) clearTimeout(hoverTimeout);
|
||||
preventHover = true;
|
||||
hoverTimeout = setTimeout(() => preventHover = false, 500);
|
||||
hoverTimeout = setTimeout(() => (preventHover = false), 500);
|
||||
document.body.classList.remove("hoverEnabled");
|
||||
}
|
||||
};
|
||||
|
||||
document.addEventListener("touchstart", disableHover, true);
|
||||
document.addEventListener("mousemove", enableHover, true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user