20 files changed
+290
-49
No files matched your search
@@ -271,6 +271,7 @@ function App() {
|
|||||||
console.log("WindowAPi not present");
|
console.log("WindowAPi not present");
|
||||||
serverAvailable().then((available) => {
|
serverAvailable().then((available) => {
|
||||||
if (available) {
|
if (available) {
|
||||||
|
console.log(available);
|
||||||
createApi().then(
|
createApi().then(
|
||||||
userSaved().then((userSavedBool) => {
|
userSaved().then((userSavedBool) => {
|
||||||
if (userSavedBool) {
|
if (userSavedBool) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/** @format */
|
/** @format */
|
||||||
import { useEffect } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
import MuiAppBar from "@mui/material/AppBar";
|
import MuiAppBar from "@mui/material/AppBar";
|
||||||
import TextField from "@mui/material/TextField";
|
import TextField from "@mui/material/TextField";
|
||||||
@@ -28,7 +28,7 @@ export const AppBar = () => {
|
|||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const visible = useSelector((state) => state.appBar.visible);
|
const [display, setDisplay] = useState(false);
|
||||||
const backButtonVisible = useSelector(
|
const backButtonVisible = useSelector(
|
||||||
(state) => state.appBar.backButtonVisible,
|
(state) => state.appBar.backButtonVisible,
|
||||||
);
|
);
|
||||||
@@ -42,7 +42,7 @@ export const AppBar = () => {
|
|||||||
let usr = await getUserApi(window.api).getCurrentUser();
|
let usr = await getUserApi(window.api).getCurrentUser();
|
||||||
return usr.data;
|
return usr.data;
|
||||||
},
|
},
|
||||||
enabled: visible,
|
enabled: display,
|
||||||
networkMode: "always",
|
networkMode: "always",
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -51,14 +51,28 @@ export const AppBar = () => {
|
|||||||
threshold: 0,
|
threshold: 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (
|
||||||
|
location.pathname.includes("login") ||
|
||||||
|
location.pathname.includes("setup")
|
||||||
|
) {
|
||||||
|
setDisplay(false);
|
||||||
|
} else {
|
||||||
|
setDisplay(true);
|
||||||
|
}
|
||||||
|
}, [location]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (location.pathname == "/home") {
|
if (location.pathname == "/home") {
|
||||||
dispatch(hideBackButton());
|
dispatch(hideBackButton());
|
||||||
}
|
}
|
||||||
});
|
}, [location]);
|
||||||
|
|
||||||
|
if (!display) {
|
||||||
|
return <></>;
|
||||||
|
}
|
||||||
|
if (display) {
|
||||||
return (
|
return (
|
||||||
visible && (
|
|
||||||
<MuiAppBar
|
<MuiAppBar
|
||||||
sx={{
|
sx={{
|
||||||
width: `calc(100vw - ${theme.spacing(7)})`,
|
width: `calc(100vw - ${theme.spacing(7)})`,
|
||||||
@@ -130,6 +144,6 @@ export const AppBar = () => {
|
|||||||
</Box>
|
</Box>
|
||||||
</Toolbar>
|
</Toolbar>
|
||||||
</MuiAppBar>
|
</MuiAppBar>
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
/** @format */
|
/** @format */
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
|
import Box from "@mui/material/Box";
|
||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
import ButtonBase from "@mui/material/ButtonBase";
|
import ButtonBase from "@mui/material/ButtonBase";
|
||||||
|
|
||||||
@@ -10,7 +11,7 @@ import "./avatar.module.scss";
|
|||||||
|
|
||||||
export const AvatarImage = ({ userId, userImageTags }) => {
|
export const AvatarImage = ({ userId, userImageTags }) => {
|
||||||
return (
|
return (
|
||||||
<div className="avatar-image-container">
|
<Box className="avatar-image-container">
|
||||||
{!!userImageTags && (
|
{!!userImageTags && (
|
||||||
<div
|
<div
|
||||||
className="avatar-image"
|
className="avatar-image"
|
||||||
@@ -28,7 +29,7 @@ export const AvatarImage = ({ userId, userImageTags }) => {
|
|||||||
<div className="avatar-image-icon-container">
|
<div className="avatar-image-icon-container">
|
||||||
<MdiAccount className="avatar-image-icon" />
|
<MdiAccount className="avatar-image-icon" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -18,8 +18,8 @@
|
|||||||
&-icon {
|
&-icon {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0.2em;
|
padding: 0.2em;
|
||||||
background: $clr-accent-dark;
|
background: $clr-gradient-dark;
|
||||||
color: $clr-accent-default;
|
fill: url(#clr-gradient-default) !important;
|
||||||
font-size: 2em !important;
|
font-size: 7em !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -51,6 +51,7 @@ export const EpisodeCard = ({
|
|||||||
favourite,
|
favourite,
|
||||||
showName,
|
showName,
|
||||||
episodeLocation,
|
episodeLocation,
|
||||||
|
centerAlignText = false,
|
||||||
}) => {
|
}) => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const [imgLoading, setImgLoading] = useState(true);
|
const [imgLoading, setImgLoading] = useState(true);
|
||||||
@@ -270,13 +271,16 @@ export const EpisodeCard = ({
|
|||||||
component="div"
|
component="div"
|
||||||
color="white"
|
color="white"
|
||||||
fontWeight={500}
|
fontWeight={500}
|
||||||
textAlign="left"
|
textAlign={
|
||||||
|
centerAlignText ? "center" : "left"
|
||||||
|
}
|
||||||
noWrap
|
noWrap
|
||||||
width="fit-content"
|
width="fit-content"
|
||||||
maxWidth="100%"
|
maxWidth="100%"
|
||||||
>
|
>
|
||||||
{itemName}
|
{itemName}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
{!!itemTicks && (
|
||||||
<Typography
|
<Typography
|
||||||
gutterBottom={false}
|
gutterBottom={false}
|
||||||
variant="h6"
|
variant="h6"
|
||||||
@@ -293,6 +297,7 @@ export const EpisodeCard = ({
|
|||||||
>
|
>
|
||||||
{getRuntime(itemTicks)}
|
{getRuntime(itemTicks)}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
<Stack
|
<Stack
|
||||||
alignItems="flex-start"
|
alignItems="flex-start"
|
||||||
@@ -308,6 +313,7 @@ export const EpisodeCard = ({
|
|||||||
}
|
}
|
||||||
mb={1}
|
mb={1}
|
||||||
>
|
>
|
||||||
|
{!!itemRating && (
|
||||||
<Typography
|
<Typography
|
||||||
gutterBottom={false}
|
gutterBottom={false}
|
||||||
variant="subtitle1"
|
variant="subtitle1"
|
||||||
@@ -326,10 +332,15 @@ export const EpisodeCard = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<MdiStarHalfFull
|
<MdiStarHalfFull
|
||||||
sx={{ fontSize: "1.2em", mr: "0.25em" }}
|
sx={{
|
||||||
|
fontSize: "1.2em",
|
||||||
|
mr: "0.25em",
|
||||||
|
}}
|
||||||
/>{" "}
|
/>{" "}
|
||||||
{itemRating}
|
{itemRating}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
)}
|
||||||
|
{!!itemTicks && (
|
||||||
<Typography
|
<Typography
|
||||||
gutterBottom={false}
|
gutterBottom={false}
|
||||||
variant="subtitle1"
|
variant="subtitle1"
|
||||||
@@ -349,6 +360,7 @@ export const EpisodeCard = ({
|
|||||||
>
|
>
|
||||||
{endsAt(itemTicks)}
|
{endsAt(itemTicks)}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
<Typography
|
<Typography
|
||||||
gutterBottom
|
gutterBottom
|
||||||
@@ -387,6 +399,7 @@ EpisodeCard.propTypes = {
|
|||||||
favourite: PropTypes.bool,
|
favourite: PropTypes.bool,
|
||||||
showName: PropTypes.string,
|
showName: PropTypes.string,
|
||||||
episodeLocation: PropTypes.string,
|
episodeLocation: PropTypes.string,
|
||||||
itemTicks: PropTypes.number.isRequired,
|
itemTicks: PropTypes.number,
|
||||||
itemRating: PropTypes.number.isRequired,
|
itemRating: PropTypes.number,
|
||||||
|
centerAlignText: PropTypes.bool,
|
||||||
};
|
};
|
||||||
@@ -21,6 +21,7 @@ export const CardScroller = ({
|
|||||||
displayCards,
|
displayCards,
|
||||||
title,
|
title,
|
||||||
headingProps,
|
headingProps,
|
||||||
|
disableDecoration = false,
|
||||||
}) => {
|
}) => {
|
||||||
const responsive = {
|
const responsive = {
|
||||||
superLargeDesktop: {
|
superLargeDesktop: {
|
||||||
@@ -50,7 +51,14 @@ export const CardScroller = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Box className="card-scroller-container" sx={{ mb: 4 }}>
|
<Box className="card-scroller-container" sx={{ mb: 4 }}>
|
||||||
<Box sx={{ mb: 2 }} className="card-scroller-header-container">
|
<Box
|
||||||
|
sx={{ mb: 2 }}
|
||||||
|
className={
|
||||||
|
disableDecoration
|
||||||
|
? `card-scroller-header-container hidden-decoration`
|
||||||
|
: `card-scroller-header-container`
|
||||||
|
}
|
||||||
|
>
|
||||||
<Typography
|
<Typography
|
||||||
variant="h4"
|
variant="h4"
|
||||||
color="textPrimary"
|
color="textPrimary"
|
||||||
|
|||||||
@@ -29,3 +29,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hidden-decoration {
|
||||||
|
.card-scroller-heading-decoration {
|
||||||
|
display: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,6 +15,7 @@ export const LatestMediaSection = ({ latestMediaLib }) => {
|
|||||||
let usr = await getUserApi(window.api).getCurrentUser();
|
let usr = await getUserApi(window.api).getCurrentUser();
|
||||||
return usr.data;
|
return usr.data;
|
||||||
},
|
},
|
||||||
|
networkMode: "always",
|
||||||
});
|
});
|
||||||
const fetchLatestMedia = async (library) => {
|
const fetchLatestMedia = async (library) => {
|
||||||
const media = await getUserLibraryApi(window.api).getLatestMedia({
|
const media = await getUserLibraryApi(window.api).getLatestMedia({
|
||||||
@@ -29,6 +30,7 @@ export const LatestMediaSection = ({ latestMediaLib }) => {
|
|||||||
queryKey: ["homeSection, latestMedia", latestMediaLib],
|
queryKey: ["homeSection, latestMedia", latestMediaLib],
|
||||||
queryFn: () => fetchLatestMedia(latestMediaLib[0]),
|
queryFn: () => fetchLatestMedia(latestMediaLib[0]),
|
||||||
enabled: !!user.data,
|
enabled: !!user.data,
|
||||||
|
networkMode: "always",
|
||||||
});
|
});
|
||||||
if (data.isLoading) {
|
if (data.isLoading) {
|
||||||
return <CardsSkeleton />;
|
return <CardsSkeleton />;
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
/** @format */
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiAlertDecagram } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiAlertDecagram = (props) => {
|
||||||
|
return (
|
||||||
|
<SvgIcon {...props}>
|
||||||
|
<path d={mdiAlertDecagram}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
/** @format */
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiEmoticonCry } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiEmoticonCry = (props) => {
|
||||||
|
return (
|
||||||
|
<SvgIcon {...props}>
|
||||||
|
<path d={mdiEmoticonCry}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
/** @format */
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiEmoticonDead } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiEmoticonDead = (props) => {
|
||||||
|
return (
|
||||||
|
<SvgIcon {...props}>
|
||||||
|
<path d={mdiEmoticonDead}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -62,7 +62,6 @@ export const SideMenu = ({}) => {
|
|||||||
|
|
||||||
const [display, setDisplay] = useState(false);
|
const [display, setDisplay] = useState(false);
|
||||||
|
|
||||||
const visible = useSelector((state) => state.sidebar.visible);
|
|
||||||
const backdrop = useSelector((state) => state.sidebar.backdrop);
|
const backdrop = useSelector((state) => state.sidebar.backdrop);
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const user = useQuery({
|
const user = useQuery({
|
||||||
@@ -96,15 +95,18 @@ export const SideMenu = ({}) => {
|
|||||||
navigate("/login");
|
navigate("/login");
|
||||||
};
|
};
|
||||||
|
|
||||||
const getCurrentPathWithoutParam = () => {
|
const getCurrentLocation = () => {
|
||||||
return location.pathname.slice(0, location.pathname.lastIndexOf("/"));
|
return location.pathname.slice(0, location.pathname.lastIndexOf("/"));
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
console.log(location.pathname.includes("login"));
|
||||||
if (
|
if (
|
||||||
getCurrentPathWithoutParam() != "/login" &&
|
location.pathname.includes("login") ||
|
||||||
getCurrentPathWithoutParam() != "/setup/server"
|
location.pathname.includes("setup")
|
||||||
) {
|
) {
|
||||||
|
setDisplay(false);
|
||||||
|
} else {
|
||||||
setDisplay(true);
|
setDisplay(true);
|
||||||
}
|
}
|
||||||
}, [location]);
|
}, [location]);
|
||||||
@@ -122,17 +124,13 @@ export const SideMenu = ({}) => {
|
|||||||
sx: {
|
sx: {
|
||||||
backgroundColor: "inherit",
|
backgroundColor: "inherit",
|
||||||
border: "none",
|
border: "none",
|
||||||
width: visible
|
width: `calc(${theme.spacing(7)} + 10px)`,
|
||||||
? `calc(${theme.spacing(7)} + 10px)`
|
|
||||||
: 0,
|
|
||||||
height: "100vh",
|
height: "100vh",
|
||||||
// display: visible ? "block" : "none",
|
// display: visible ? "block" : "none",
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
sx={{
|
sx={{
|
||||||
width: visible
|
width: `calc(${theme.spacing(7)} + 10px)`,
|
||||||
? `calc(${theme.spacing(7)} + 10px)`
|
|
||||||
: 0,
|
|
||||||
background: backdrop
|
background: backdrop
|
||||||
? theme.palette.background.paper
|
? theme.palette.background.paper
|
||||||
: "transparent",
|
: "transparent",
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
/** @format */
|
/** @format */
|
||||||
|
|
||||||
import Box from "@mui/material/Box";
|
import Box from "@mui/material/Box";
|
||||||
import { MdiEmoticonCryOutline } from "../icons/mdiEmoticonCryOutline";
|
import { MdiEmoticonCry } from "../../icons/mdiEmoticonCry";
|
||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
|
|
||||||
export const EmptyNotice = () => {
|
export const EmptyNotice = () => {
|
||||||
@@ -17,7 +17,7 @@ export const EmptyNotice = () => {
|
|||||||
opacity: 0.2,
|
opacity: 0.2,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<MdiEmoticonCryOutline sx={{ fontSize: 200 }} />
|
<MdiEmoticonCry sx={{ fontSize: 200 }} />
|
||||||
<Typography variant="h3">Nothing found</Typography>
|
<Typography variant="h3">Nothing found</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
import Box from "@mui/material/Box";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import { MdiEmoticonDead } from "../../icons/mdiEmoticonDead";
|
||||||
|
|
||||||
|
export const ErrorNotice = () => {
|
||||||
|
return (
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
height: "100%",
|
||||||
|
display: "flex",
|
||||||
|
justifyContent: "center",
|
||||||
|
alignItems: "center",
|
||||||
|
flexFlow: "column",
|
||||||
|
opacity: 0.2,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<MdiEmoticonDead sx={{ fontSize: 200 }} />
|
||||||
|
<Typography variant="h3">Something went wrong</Typography>
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -101,4 +101,5 @@ export const TypeIconCollectionCard = {
|
|||||||
UserView: <MdiMultimedia className="card-image-icon" />,
|
UserView: <MdiMultimedia className="card-image-icon" />,
|
||||||
Video: <MdiFilmstrip className="card-image-icon" />,
|
Video: <MdiFilmstrip className="card-image-icon" />,
|
||||||
Year: <MdiMultimedia className="card-image-icon" />,
|
Year: <MdiMultimedia className="card-image-icon" />,
|
||||||
|
Genre: <MdiDramaMasks className="card-image-icon" />,
|
||||||
};
|
};
|
||||||
@@ -67,6 +67,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
&-title-logo {
|
&-title-logo {
|
||||||
|
filter: drop-shadow(0 0 10px rgb(0 0 0 /0.2));
|
||||||
max-width: 75%;
|
max-width: 75%;
|
||||||
|
height: 2em;
|
||||||
|
object-fit: contain;
|
||||||
|
object-position: bottom;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -45,6 +45,7 @@ import { MdiCheck } from "../../components/icons/mdiCheck";
|
|||||||
import { MdiHeartOutline } from "../../components/icons/mdiHeartOutline";
|
import { MdiHeartOutline } from "../../components/icons/mdiHeartOutline";
|
||||||
import { MdiHeart } from "../../components/icons/mdiHeart";
|
import { MdiHeart } from "../../components/icons/mdiHeart";
|
||||||
import { EpisodeCardsSkeleton } from "../../components/skeleton/episodeCards";
|
import { EpisodeCardsSkeleton } from "../../components/skeleton/episodeCards";
|
||||||
|
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
||||||
function TabPanel(props) {
|
function TabPanel(props) {
|
||||||
const { children, value, index, ...other } = props;
|
const { children, value, index, ...other } = props;
|
||||||
|
|
||||||
@@ -165,6 +166,22 @@ const ItemDetail = () => {
|
|||||||
refetchOnWindowFocus: true,
|
refetchOnWindowFocus: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const nextUpEpisode = useQuery({
|
||||||
|
queryKey: ["item", "seasons", id, "nextUp"],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getTvShowsApi(window.api).getNextUp({
|
||||||
|
userId: user.data.Id,
|
||||||
|
limit: 1,
|
||||||
|
parentId: item.data.Id,
|
||||||
|
disableFirstEpisode: true,
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: item.isSuccess && item.data.Type == "Series",
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
const [currentSeason, setCurrentSeason] = useState(0);
|
const [currentSeason, setCurrentSeason] = useState(0);
|
||||||
const episodes = useQuery({
|
const episodes = useQuery({
|
||||||
queryKey: ["item", "episode", `season ${currentSeason + 1}`],
|
queryKey: ["item", "episode", `season ${currentSeason + 1}`],
|
||||||
@@ -311,7 +328,8 @@ const ItemDetail = () => {
|
|||||||
<CircularProgress />
|
<CircularProgress />
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
} else if (item.isSuccess && similarItems.isSuccess) {
|
}
|
||||||
|
if (item.isSuccess && similarItems.isSuccess) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Box className="item-detail-backdrop">
|
<Box className="item-detail-backdrop">
|
||||||
@@ -477,9 +495,9 @@ const ItemDetail = () => {
|
|||||||
>
|
>
|
||||||
<Typography
|
<Typography
|
||||||
variant="h3"
|
variant="h3"
|
||||||
sx={{ width: "30%" }}
|
|
||||||
textOverflow="ellipsis"
|
textOverflow="ellipsis"
|
||||||
whiteSpace="nowrap"
|
whiteSpace="nowrap"
|
||||||
|
width="100%"
|
||||||
>
|
>
|
||||||
{!!item.data.ImageTags
|
{!!item.data.ImageTags
|
||||||
.Logo ? (
|
.Logo ? (
|
||||||
@@ -710,6 +728,77 @@ const ItemDetail = () => {
|
|||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{nextUpEpisode.isSuccess && (
|
||||||
|
<Grid2
|
||||||
|
container
|
||||||
|
columns={{
|
||||||
|
xs: 2,
|
||||||
|
sm: 3,
|
||||||
|
md: 4,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{nextUpEpisode.data.Items.map(
|
||||||
|
(mitem, mindex) => {
|
||||||
|
return (
|
||||||
|
<Grid2
|
||||||
|
key={mindex}
|
||||||
|
xs={1}
|
||||||
|
sm={1}
|
||||||
|
md={1}
|
||||||
|
>
|
||||||
|
<EpisodeCard
|
||||||
|
itemId={mitem.Id}
|
||||||
|
itemName={`${mitem.IndexNumber}. ${mitem.Name}`}
|
||||||
|
imageTags={
|
||||||
|
!!mitem
|
||||||
|
.ImageTags
|
||||||
|
.Primary
|
||||||
|
}
|
||||||
|
playedPercent={
|
||||||
|
mitem.UserData
|
||||||
|
.PlayedPercentage
|
||||||
|
}
|
||||||
|
watchedStatus={
|
||||||
|
mitem.UserData
|
||||||
|
.Played
|
||||||
|
}
|
||||||
|
favourite={
|
||||||
|
mitem.UserData
|
||||||
|
.IsFavorite
|
||||||
|
}
|
||||||
|
blurhash={
|
||||||
|
mitem.ImageBlurHashes ==
|
||||||
|
{}
|
||||||
|
? ""
|
||||||
|
: !!mitem
|
||||||
|
.ImageTags
|
||||||
|
.Primary
|
||||||
|
? !!mitem
|
||||||
|
.ImageBlurHashes
|
||||||
|
.Primary
|
||||||
|
? mitem
|
||||||
|
.ImageBlurHashes
|
||||||
|
.Primary[
|
||||||
|
mitem
|
||||||
|
.ImageTags
|
||||||
|
.Primary
|
||||||
|
]
|
||||||
|
: ""
|
||||||
|
: ""
|
||||||
|
}
|
||||||
|
currentUser={
|
||||||
|
user.data
|
||||||
|
}
|
||||||
|
centerAlignText
|
||||||
|
/>
|
||||||
|
</Grid2>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)}
|
||||||
|
</Grid2>
|
||||||
|
)}
|
||||||
|
|
||||||
{seasons.isSuccess && (
|
{seasons.isSuccess && (
|
||||||
<Box>
|
<Box>
|
||||||
<Tabs
|
<Tabs
|
||||||
@@ -1609,8 +1698,9 @@ const ItemDetail = () => {
|
|||||||
</Box>
|
</Box>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
} else if (item.isError || similarItems.isError) {
|
}
|
||||||
return <h1>{"Something went wrong :("}</h1>;
|
if (item.isError || similarItems.isError) {
|
||||||
|
return <ErrorNotice />;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ import { getStudiosApi } from "@jellyfin/sdk/lib/utils/api/studios-api";
|
|||||||
import { getPersonsApi } from "@jellyfin/sdk/lib/utils/api/persons-api";
|
import { getPersonsApi } from "@jellyfin/sdk/lib/utils/api/persons-api";
|
||||||
|
|
||||||
import { Card } from "../../components/card/card";
|
import { Card } from "../../components/card/card";
|
||||||
import { EmptyNotice } from "../../components/emptyNotice/emptyNotice";
|
import { EmptyNotice } from "../../components/notices/emptyNotice/emptyNotice";
|
||||||
|
|
||||||
import { MdiSortDescending } from "../../components/icons/mdiSortDescending";
|
import { MdiSortDescending } from "../../components/icons/mdiSortDescending";
|
||||||
import { MdiSortAscending } from "../../components/icons/mdiSortAscending";
|
import { MdiSortAscending } from "../../components/icons/mdiSortAscending";
|
||||||
@@ -44,6 +44,7 @@ import { MdiChevronDown } from "../../components/icons/mdiChevronDown";
|
|||||||
import { MdiFilterOutline } from "../../components/icons/mdiFilterOutline";
|
import { MdiFilterOutline } from "../../components/icons/mdiFilterOutline";
|
||||||
|
|
||||||
import { clrBackgroundDarkOpacity0_8 } from "../../palette.module.scss";
|
import { clrBackgroundDarkOpacity0_8 } from "../../palette.module.scss";
|
||||||
|
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
||||||
|
|
||||||
const LibraryView = () => {
|
const LibraryView = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
@@ -365,7 +366,7 @@ const LibraryView = () => {
|
|||||||
sx={{
|
sx={{
|
||||||
width: `calc(100vw - ${theme.spacing(7)})`,
|
width: `calc(100vw - ${theme.spacing(7)})`,
|
||||||
mt: 8,
|
mt: 8,
|
||||||
backdropFilter: `blur(30px)`,
|
backdropFilter: trigger ? `blur(30px)` : "none",
|
||||||
background: "transparent",
|
background: "transparent",
|
||||||
backgroundColor: trigger
|
backgroundColor: trigger
|
||||||
? `${clrBackgroundDarkOpacity0_8} !important`
|
? `${clrBackgroundDarkOpacity0_8} !important`
|
||||||
@@ -850,6 +851,7 @@ const LibraryView = () => {
|
|||||||
})}
|
})}
|
||||||
</Grid2>
|
</Grid2>
|
||||||
))}
|
))}
|
||||||
|
{items.isError && <ErrorNotice />}
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
|||||||
+50
-15
@@ -17,7 +17,7 @@ import { MdiEyeOutline } from "../../components/icons/mdiEyeOutline";
|
|||||||
import { MdiChevronRight } from "../../components/icons/mdiChevronRight";
|
import { MdiChevronRight } from "../../components/icons/mdiChevronRight";
|
||||||
|
|
||||||
import Container from "@mui/material/Container";
|
import Container from "@mui/material/Container";
|
||||||
import Grid from "@mui/material/Grid";
|
import Grid from "@mui/material/Unstable_Grid2";
|
||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
import OutlinedInput from "@mui/material/OutlinedInput";
|
import OutlinedInput from "@mui/material/OutlinedInput";
|
||||||
import FormControl from "@mui/material/FormControl";
|
import FormControl from "@mui/material/FormControl";
|
||||||
@@ -27,6 +27,7 @@ import IconButton from "@mui/material/IconButton";
|
|||||||
import LoadingButton from "@mui/lab/LoadingButton";
|
import LoadingButton from "@mui/lab/LoadingButton";
|
||||||
import Button from "@mui/material/Button";
|
import Button from "@mui/material/Button";
|
||||||
import Box from "@mui/material/Box";
|
import Box from "@mui/material/Box";
|
||||||
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
import LinearProgress from "@mui/material/LinearProgress";
|
import LinearProgress from "@mui/material/LinearProgress";
|
||||||
import { useSnackbar } from "notistack";
|
import { useSnackbar } from "notistack";
|
||||||
import FormGroup from "@mui/material/FormGroup";
|
import FormGroup from "@mui/material/FormGroup";
|
||||||
@@ -45,6 +46,7 @@ import { getBrandingApi } from "@jellyfin/sdk/lib/utils/api/branding-api";
|
|||||||
|
|
||||||
import "./login.module.scss";
|
import "./login.module.scss";
|
||||||
import { CardsSkeleton } from "../../components/skeleton/cards.jsx";
|
import { CardsSkeleton } from "../../components/skeleton/cards.jsx";
|
||||||
|
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice.jsx";
|
||||||
|
|
||||||
export const LoginWithImage = () => {
|
export const LoginWithImage = () => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
@@ -123,6 +125,7 @@ export const LoginWithImage = () => {
|
|||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
spacing={2}
|
spacing={2}
|
||||||
|
width="100%"
|
||||||
>
|
>
|
||||||
<Grid
|
<Grid
|
||||||
container
|
container
|
||||||
@@ -135,9 +138,9 @@ export const LoginWithImage = () => {
|
|||||||
textAlign="center"
|
textAlign="center"
|
||||||
variant="h3"
|
variant="h3"
|
||||||
color="textPrimary"
|
color="textPrimary"
|
||||||
|
mb={2}
|
||||||
>
|
>
|
||||||
Login
|
Login
|
||||||
<br />
|
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid
|
<Grid
|
||||||
@@ -145,6 +148,7 @@ export const LoginWithImage = () => {
|
|||||||
direction="column"
|
direction="column"
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
|
mb={1}
|
||||||
>
|
>
|
||||||
<AvatarImage userId={userId} />
|
<AvatarImage userId={userId} />
|
||||||
<Typography
|
<Typography
|
||||||
@@ -244,6 +248,10 @@ export const UserLogin = () => {
|
|||||||
networkMode: "always",
|
networkMode: "always",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (users.isLoading) {
|
||||||
|
return <LinearProgress />;
|
||||||
|
}
|
||||||
|
if (users.isSuccess) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppBarBackOnly />
|
<AppBarBackOnly />
|
||||||
@@ -252,38 +260,61 @@ export const UserLogin = () => {
|
|||||||
sx={{
|
sx={{
|
||||||
height: "100vh",
|
height: "100vh",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{/* <Typography variant="h3" sx={{ marginBottom: "1em" }}>
|
<Typography variant="h3" mb={2}>
|
||||||
Users
|
Users
|
||||||
</Typography> */}
|
</Typography>
|
||||||
{users.isLoading ? (
|
|
||||||
<CardsSkeleton />
|
<Grid
|
||||||
) : (
|
container
|
||||||
<Grid container direction="row">
|
columns={{
|
||||||
|
xs: 2,
|
||||||
|
sm: 3,
|
||||||
|
md: 4,
|
||||||
|
}}
|
||||||
|
wrap="nowrap"
|
||||||
|
alignItems="center"
|
||||||
|
overflow="auto"
|
||||||
|
width="100%"
|
||||||
|
mb={3}
|
||||||
|
paddingBottom={2}
|
||||||
|
className="roundedScrollbar"
|
||||||
|
>
|
||||||
{users.data.map((item, index) => {
|
{users.data.map((item, index) => {
|
||||||
return (
|
return (
|
||||||
|
<Grid
|
||||||
|
key={index}
|
||||||
|
flexShrink={0}
|
||||||
|
flexGrow={1}
|
||||||
|
xs={1}
|
||||||
|
sm={1}
|
||||||
|
md={1}
|
||||||
|
>
|
||||||
<Card
|
<Card
|
||||||
key={index}
|
key={index}
|
||||||
itemName={item.Name}
|
itemName={item.Name}
|
||||||
itemId={item.Id}
|
itemId={item.Id}
|
||||||
imageTags={!!item.PrimaryImageTag}
|
imageTags={
|
||||||
|
!!item.PrimaryImageTag
|
||||||
|
}
|
||||||
// cardType="sqaure"
|
// cardType="sqaure"
|
||||||
iconType="Person"
|
iconType="Person"
|
||||||
cardOrientation="sqaure"
|
cardOrientation="sqaure"
|
||||||
onClickEvent={navigate(
|
onClickEvent={() =>
|
||||||
|
navigate(
|
||||||
`/login/withImg/${item.Name}/${item.Id}/`,
|
`/login/withImg/${item.Name}/${item.Id}/`,
|
||||||
)}
|
)
|
||||||
cardProps={{
|
}
|
||||||
sx: { width: "33%" },
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
|
</Grid>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</Grid>
|
</Grid>
|
||||||
)}
|
|
||||||
<div className="buttons">
|
<div className="buttons">
|
||||||
<Button
|
<Button
|
||||||
color="secondary"
|
color="secondary"
|
||||||
@@ -304,6 +335,10 @@ export const UserLogin = () => {
|
|||||||
</Container>
|
</Container>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
if (users.isError) {
|
||||||
|
return <ErrorNotice />;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const UserLoginManual = () => {
|
export const UserLoginManual = () => {
|
||||||
|
|||||||
@@ -3,6 +3,11 @@
|
|||||||
width: 14px;
|
width: 14px;
|
||||||
background: $clr-background-dark;
|
background: $clr-background-dark;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.roundedScrollbar::-webkit-scrollbar-track {
|
||||||
|
border-radius: 1000px;
|
||||||
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar-track {
|
::-webkit-scrollbar-track {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
&:hover {
|
&:hover {
|
||||||
@@ -96,6 +101,7 @@ h1 {
|
|||||||
height: fit-content;
|
height: fit-content;
|
||||||
width: inherit;
|
width: inherit;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty {
|
.empty {
|
||||||
|
|||||||
Reference in new issue
Block a user