Add 'disable subtitle' option and fix cast and crew in item Page #243
This commit is contained in:
3 files changed
+105
-29
No files matched your search
@@ -636,9 +636,15 @@ const ItemDetail = () => {
|
||||
itemId={item.data.Id}
|
||||
itemType={item.data.Type}
|
||||
itemUserData={item.data.UserData}
|
||||
currentAudioTrack={0}
|
||||
currentVideoTrack={0}
|
||||
currentSubTrack={0}
|
||||
currentVideoTrack={
|
||||
selectedVideoTrack
|
||||
}
|
||||
currentAudioTrack={
|
||||
selectedAudioTrack
|
||||
}
|
||||
currentSubTrack={
|
||||
selectedSubtitleTrack
|
||||
}
|
||||
userId={user.data.Id}
|
||||
/>
|
||||
</div>
|
||||
@@ -863,6 +869,9 @@ const ItemDetail = () => {
|
||||
)
|
||||
}
|
||||
>
|
||||
<MenuItem key={-1} value={-1}>
|
||||
No Subtitle
|
||||
</MenuItem>
|
||||
{subtitleTracks.map((track) => (
|
||||
<MenuItem
|
||||
key={track.Index}
|
||||
|
||||
+72
-13
@@ -11,6 +11,10 @@ import TextField from "@mui/material/TextField";
|
||||
import MenuItem from "@mui/material/MenuItem";
|
||||
import Stack from "@mui/material/Stack";
|
||||
import LinearProgress from "@mui/material/LinearProgress";
|
||||
import Skeleton from "@mui/material/Skeleton";
|
||||
import CardMedia from "@mui/material/CardMedia";
|
||||
import CardContent from "@mui/material/CardContent";
|
||||
import MuiCard from "@mui/material/Card";
|
||||
import { red, yellow, green } from "@mui/material/colors";
|
||||
|
||||
import { motion } from "framer-motion";
|
||||
@@ -33,17 +37,14 @@ import { useQuery } from "@tanstack/react-query";
|
||||
|
||||
import { endsAt, getRuntime, getRuntimeMusic } from "../../utils/date/time";
|
||||
|
||||
import Hero from "../../components/layouts/item/hero";
|
||||
import { Card } from "../../components/card/card";
|
||||
import { EpisodeCard } from "../../components/card/episodeCard";
|
||||
import { CardScroller } from "../../components/cardScroller/cardScroller";
|
||||
|
||||
import "./series.module.scss";
|
||||
import { EpisodeCardsSkeleton } from "../../components/skeleton/episodeCards";
|
||||
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
||||
|
||||
import { useBackdropStore } from "../../utils/store/backdrop";
|
||||
import { ActorCard } from "../../components/card/actorCards";
|
||||
import { SeasonSelectorSkeleton } from "../../components/skeleton/seasonSelector";
|
||||
import LikeButton from "../../components/buttons/likeButton";
|
||||
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
||||
@@ -260,7 +261,7 @@ const SeriesTitlePage = () => {
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
className="scrollY padded-top flex flex-column item"
|
||||
className="scrollY padded-top flex flex-column item item-series"
|
||||
>
|
||||
<div className="item-hero flex flex-row">
|
||||
<div className="item-hero-backdrop-container">
|
||||
@@ -444,8 +445,9 @@ const SeriesTitlePage = () => {
|
||||
style={{ opacity: "0.8" }}
|
||||
variant="subtitle1"
|
||||
>
|
||||
{seasons.data.TotalRecordCount}{" "}
|
||||
Seasons
|
||||
{seasons.data.TotalRecordCount > 1
|
||||
? `${seasons.data.TotalRecordCount} Seasons`
|
||||
: `${seasons.data.TotalRecordCount} Season`}
|
||||
</Typography>
|
||||
)}
|
||||
|
||||
@@ -1071,10 +1073,67 @@ const SeriesTitlePage = () => {
|
||||
</div>
|
||||
<Divider />
|
||||
<div className="item-detail-episodes-container">
|
||||
{episodes.isPending ? (
|
||||
<EpisodeCardsSkeleton />
|
||||
) : (
|
||||
episodes.data.Items.map((episode) => {
|
||||
{episodes.isPending
|
||||
? Array.from(new Array(4)).map((a) => {
|
||||
return (
|
||||
<MuiCard
|
||||
key={a}
|
||||
sx={{
|
||||
background:
|
||||
"transparent",
|
||||
}}
|
||||
elevation={0}
|
||||
>
|
||||
<CardMedia>
|
||||
<Skeleton
|
||||
animation="wave"
|
||||
variant="rectangular"
|
||||
sx={{
|
||||
aspectRatio:
|
||||
"1.777",
|
||||
height: "auto",
|
||||
m: 1,
|
||||
borderRadius:
|
||||
"10px",
|
||||
}}
|
||||
/>
|
||||
</CardMedia>
|
||||
<CardContent
|
||||
sx={{
|
||||
padding: "0 0.5em",
|
||||
alignItems:
|
||||
"flex-start",
|
||||
backgroundColor:
|
||||
"transparent",
|
||||
}}
|
||||
>
|
||||
<Typography variant="h6">
|
||||
<Skeleton
|
||||
variant="text"
|
||||
animation="wave"
|
||||
/>
|
||||
</Typography>
|
||||
|
||||
<Typography variant="body2">
|
||||
<Skeleton
|
||||
variant="text"
|
||||
animation="wave"
|
||||
/>
|
||||
<Skeleton
|
||||
variant="text"
|
||||
animation="wave"
|
||||
/>
|
||||
|
||||
<Skeleton
|
||||
variant="text"
|
||||
animation="wave"
|
||||
/>
|
||||
</Typography>
|
||||
</CardContent>
|
||||
</MuiCard>
|
||||
);
|
||||
})
|
||||
: episodes.data.Items.map((episode) => {
|
||||
return (
|
||||
<motion.div
|
||||
key={episode.Id}
|
||||
@@ -1136,13 +1195,13 @@ const SeriesTitlePage = () => {
|
||||
"episodes",
|
||||
]}
|
||||
userId={
|
||||
user.data.Id
|
||||
user.data
|
||||
.Id
|
||||
}
|
||||
/>
|
||||
</motion.div>
|
||||
);
|
||||
})
|
||||
)}
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -82,19 +82,15 @@
|
||||
align-items: start;
|
||||
gap: 1em;
|
||||
|
||||
&-nextUp {
|
||||
max-width: 23em;
|
||||
}
|
||||
|
||||
&-cast {
|
||||
max-height: 50vh;
|
||||
overflow-y: auto;
|
||||
mask-image: linear-gradient(to top, transparent, black 1.2em);
|
||||
-webkit-mask-image: linear-gradient(
|
||||
to top,
|
||||
transparent,
|
||||
black 1.2em
|
||||
);
|
||||
&-title {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background: $clr-background-default;
|
||||
background: $clr-background-dark;
|
||||
padding: 0.35em;
|
||||
border-radius: 10px;
|
||||
z-index: 1;
|
||||
@@ -106,7 +102,7 @@
|
||||
}
|
||||
&-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
grid-template-columns: repeat(5, minmax(0, 1fr));
|
||||
gap: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
@@ -162,8 +158,20 @@
|
||||
}
|
||||
}
|
||||
|
||||
.item-series {
|
||||
.item-detail-cast {
|
||||
max-height: 50vh;
|
||||
overflow-y: auto;
|
||||
mask-image: linear-gradient(to top, transparent, black 1.2em);
|
||||
-webkit-mask-image: linear-gradient(to top, transparent, black 1.2em);
|
||||
&-grid {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1320px) {
|
||||
.item-detail {
|
||||
.item-series .item-detail {
|
||||
&-cast {
|
||||
&-grid {
|
||||
grid-template-columns: 1fr;
|
||||
@@ -176,7 +184,7 @@
|
||||
}
|
||||
|
||||
@media (max-width: 830px) {
|
||||
.item-detail {
|
||||
.item-series .item-detail {
|
||||
&-episodes-container {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
@@ -184,7 +192,7 @@
|
||||
}
|
||||
|
||||
@media (max-width: 564px) {
|
||||
.item-detail {
|
||||
.item-series .item-detail {
|
||||
&-episodes-container {
|
||||
grid-template-columns: repeat(1, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user