Update SeriesTitlePage #160
This commit is contained in:
7 files changed
+65
-67
No files matched your search
+1
-1
@@ -44,6 +44,7 @@ import Home from "./routes/home";
|
||||
import { UserLogin, LoginWithImage, UserLoginManual } from "./routes/login";
|
||||
import LibraryView from "./routes/library";
|
||||
import ItemDetail from "./routes/item";
|
||||
import SeriesTitlePage from "./routes/series/index.jsx";
|
||||
import FavouritePage from "./routes/favourite/index.jsx";
|
||||
import Settings from "./routes/settings";
|
||||
import About from "./routes/about";
|
||||
@@ -72,7 +73,6 @@ import { delUser, getUser } from "./utils/storage/user.js";
|
||||
import axios from "axios";
|
||||
import { useBackdropStore } from "./utils/store/backdrop.js";
|
||||
import { usePlaybackDataLoadStore } from "./utils/store/playback.js";
|
||||
import SeriesTitlePage from "./routes/series/index.jsx";
|
||||
|
||||
const jellyfin = new Jellyfin({
|
||||
clientInfo: {
|
||||
|
||||
@@ -199,7 +199,7 @@ export const Card = ({
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{100 > item.UserData?.PlayedPercentage > 0 && (
|
||||
{item.UserData?.PlaybackPositionTicks > 0 && (
|
||||
<LinearProgress
|
||||
variant="determinate"
|
||||
value={item.UserData.PlayedPercentage}
|
||||
|
||||
@@ -112,8 +112,8 @@ const CarouselSlide = ({ item }) => {
|
||||
initial={{
|
||||
transform:
|
||||
animationDirection == "right"
|
||||
? "translateX(10%)"
|
||||
: "translateX(-10%)",
|
||||
? "translateX(40px)"
|
||||
: "translateX(-40px)",
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
@@ -123,14 +123,14 @@ const CarouselSlide = ({ item }) => {
|
||||
exit={{
|
||||
transform:
|
||||
animationDirection == "right"
|
||||
? "translateX(-10%)"
|
||||
: "translateX(10%)",
|
||||
? "translateX(-40px)"
|
||||
: "translateX(40px)",
|
||||
|
||||
opacity: 0,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
ease: "anticipate",
|
||||
}}
|
||||
className="hero-carousel-detail"
|
||||
>
|
||||
|
||||
@@ -34,7 +34,7 @@ import { MediaTypeIconCollection } from "../../utils/iconsCollection";
|
||||
* @property {import("@jellyfin/sdk/lib/generated-client/models").BaseItemPerson[]} writers
|
||||
* @property {import("@jellyfin/sdk/lib/generated-client/models").BaseItemPerson[]} directors
|
||||
* @property {import("@jellyfin/sdk/lib/generated-client/models").BaseItemPerson[]} artists
|
||||
*
|
||||
* @property {import("@jellyfin/sdk/lib/generated-client/models").NameGuidPair[]} studios
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -49,6 +49,7 @@ const Hero = ({
|
||||
writers = [],
|
||||
directors = [],
|
||||
artists = [],
|
||||
studios = [],
|
||||
}) => {
|
||||
const filterMediaStreamVideo = (source) => {
|
||||
if (source.Type == MediaStreamType.Video) {
|
||||
@@ -174,7 +175,7 @@ const Hero = ({
|
||||
marginTop: "4em",
|
||||
}}
|
||||
>
|
||||
<Typography variant="h3" fontWeight={600}>
|
||||
<Typography variant="h2" fontWeight={300}>
|
||||
{item.Name}
|
||||
</Typography>
|
||||
</div>
|
||||
@@ -267,7 +268,7 @@ const Hero = ({
|
||||
{item.Genres.join(", ")}
|
||||
</Typography>
|
||||
</div>
|
||||
{100 > item.UserData?.PlayedPercentage > 0 && (
|
||||
{item.UserData?.PlaybackPositionTicks > 0 && (
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
@@ -523,10 +524,10 @@ const Hero = ({
|
||||
)}
|
||||
{artists.length > 0 && (
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
}}
|
||||
className="hero-grid"
|
||||
style={{
|
||||
marginTop: "0.5em",
|
||||
}}
|
||||
>
|
||||
<Typography
|
||||
variant="subtitle1"
|
||||
@@ -539,7 +540,30 @@ const Hero = ({
|
||||
</Typography>
|
||||
<Typography variant="subtitle1">
|
||||
{artists
|
||||
.map((director) => director.Name)
|
||||
.map((artist) => artist.Name)
|
||||
.join(", ")}
|
||||
</Typography>
|
||||
</div>
|
||||
)}
|
||||
{studios.length > 0 && (
|
||||
<div
|
||||
className="hero-grid"
|
||||
style={{
|
||||
marginTop: "0.5em",
|
||||
}}
|
||||
>
|
||||
<Typography
|
||||
variant="subtitle1"
|
||||
style={{
|
||||
opacity: 0.6,
|
||||
}}
|
||||
noWrap
|
||||
>
|
||||
Airs On
|
||||
</Typography>
|
||||
<Typography variant="subtitle1">
|
||||
{studios
|
||||
.map((studio) => studio.Name)
|
||||
.join(", ")}
|
||||
</Typography>
|
||||
</div>
|
||||
|
||||
@@ -9,7 +9,7 @@ $maskPercentage: 40%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: -1;
|
||||
filter: brightness(0.5);
|
||||
filter: brightness(0.4);
|
||||
mask-image: linear-gradient(
|
||||
to bottom,
|
||||
black $maskPercentage,
|
||||
|
||||
+25
-51
@@ -188,6 +188,7 @@ const SeriesTitlePage = () => {
|
||||
limit: 1,
|
||||
parentId: item.data.Id,
|
||||
disableFirstEpisode: true,
|
||||
fields: [ItemFields.Overview],
|
||||
});
|
||||
return result.data;
|
||||
},
|
||||
@@ -301,7 +302,9 @@ const SeriesTitlePage = () => {
|
||||
queryKey={["item", id]}
|
||||
writers={writers}
|
||||
directors={directors}
|
||||
studios={item.data.Studios}
|
||||
/>
|
||||
|
||||
{nextUpEpisode.isSuccess &&
|
||||
nextUpEpisode.data.TotalRecordCount > 0 && (
|
||||
<CardScroller
|
||||
@@ -312,54 +315,33 @@ const SeriesTitlePage = () => {
|
||||
{nextUpEpisode.data.Items.map(
|
||||
(episode, index) => {
|
||||
return (
|
||||
<Card
|
||||
key={episode.Id}
|
||||
<EpisodeCard
|
||||
item={episode}
|
||||
cardTitle={episode.Name}
|
||||
cardTitle={`${episode.IndexNumber}. ${episode.Name}`}
|
||||
cardCaption={
|
||||
episode.Role
|
||||
episode.Overview
|
||||
}
|
||||
cardType="thumb"
|
||||
userId={user.data.Id}
|
||||
imageBlurhash={
|
||||
episode
|
||||
.ImageBlurHashes
|
||||
?.Primary[0]
|
||||
?.Primary[
|
||||
Object.keys(
|
||||
episode
|
||||
.ImageBlurHashes
|
||||
.Primary,
|
||||
)[0]
|
||||
]
|
||||
}
|
||||
// overrideIcon="Person"
|
||||
// disableOverlay
|
||||
/>
|
||||
);
|
||||
},
|
||||
)}
|
||||
</CardScroller>
|
||||
)}
|
||||
{nextUpEpisode.isSuccess &&
|
||||
nextUpEpisode.data.TotalRecordCount > 0 && (
|
||||
<CardScroller
|
||||
title="Next Up"
|
||||
displayCards={4}
|
||||
disableDecoration
|
||||
>
|
||||
{nextUpEpisode.data.Items.map(
|
||||
(episode, index) => {
|
||||
return (
|
||||
<Card
|
||||
key={episode.Id}
|
||||
item={episode}
|
||||
cardTitle={episode.Name}
|
||||
cardCaption={
|
||||
episode.Role
|
||||
}
|
||||
cardType="thumb"
|
||||
queryKey={[
|
||||
"item",
|
||||
id,
|
||||
`season ${
|
||||
currentSeason +
|
||||
1
|
||||
}`,
|
||||
"episodes",
|
||||
]}
|
||||
userId={user.data.Id}
|
||||
imageBlurhash={
|
||||
episode
|
||||
.ImageBlurHashes
|
||||
?.Primary[0]
|
||||
}
|
||||
// overrideIcon="Person"
|
||||
// disableOverlay
|
||||
/>
|
||||
);
|
||||
},
|
||||
@@ -514,6 +496,9 @@ const SeriesTitlePage = () => {
|
||||
>
|
||||
{specialFeatures.data.map(
|
||||
(special, index) => {
|
||||
console.log(
|
||||
special.ImageBlurHashes,
|
||||
);
|
||||
return (
|
||||
<Card
|
||||
key={special.Id}
|
||||
@@ -533,17 +518,6 @@ const SeriesTitlePage = () => {
|
||||
"similarItem",
|
||||
]}
|
||||
userId={user.data.Id}
|
||||
imageBlurhash={
|
||||
special
|
||||
.ImageBlurHashes
|
||||
?.Primary[
|
||||
Object.keys(
|
||||
special
|
||||
.ImageBlurHashes
|
||||
.Primary,
|
||||
)[0]
|
||||
]
|
||||
}
|
||||
onClick={() => {}}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -50,7 +50,7 @@ body {
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: -1;
|
||||
filter: blur(100px) saturate(120%) contrast(110%);
|
||||
filter: blur(60px) saturate(110%) contrast(110%);
|
||||
&-container {
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
|
||||
Reference in new issue
Block a user