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