Fix coding style

This commit is contained in:
Zoe Roux 2022-10-11 00:42:22 +09:00
parent d7dc66301e
commit 3488aeb03b
6 changed files with 22 additions and 10 deletions

View File

@ -77,7 +77,7 @@ namespace Kyoo.Abstractions.Models
/// <summary>
/// The summary of this episode.
/// </summay>
/// </summary>
public string Overview { get; set; }
/// <summary>

View File

@ -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,

View File

@ -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 (

View File

@ -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>

View File

@ -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;

View File

@ -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);