fix: cast and crew being cut off in itemDetail page #243

This commit is contained in:
Prayag Prajapati committed 2024-01-17 18:50:41 +05:30
1 parent 63b717adfb
commit 9e73421540
4 files changed
+67 -64

No files matched your search

+2 -2
View File
@@ -138,8 +138,8 @@ const CarouselSlide = ({ item }) => {
opacity: 0,
}}
transition={{
duration: 0.35,
ease: "anticipate",
duration: 0.25,
ease: "easeInOut",
}}
key={item.Id}
variant="h2"
+59 -58
View File
@@ -5,6 +5,64 @@ $border-radius: 20px;
.item-hero-image-container{
width: 22% !important;
}
.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);
&-title {
position: sticky;
top: 0;
background: $clr-background-dark;
padding: 0.35em;
border-radius: 10px;
z-index: 1;
}
&-container {
display: flex;
flex-direction: column;
gap: 1em;
}
&-grid {
display: grid;
gap: 1em;
margin-bottom: 1em;
grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
&-card {
display: grid;
grid-template-columns: 6em 1fr;
gap: 0.5em;
align-items: center;
color: white !important;
text-decoration: none;
padding: 0.5em;
background: rgb(255 255 255 / 0);
transition: background $transition-time-default;
border-radius: $border-radius-default;
&:hover {
background: rgb(255 255 255 / 0.1);
}
&-image,
&-icon {
width: 6em;
height: 6em;
object-fit: cover;
border-radius: 100%;
box-shadow: $shadow-card-image;
}
&-icon {
display: flex;
align-items: center;
justify-content: center;
font-size: 1em;
background: rgb(255 255 255 / 0.1);
.material-symbols-rounded {
font-size: 3em;
}
}
}
}
}
.item-detail-album {
&-track {
@@ -130,64 +188,7 @@ $border-radius: 20px;
align-items: start;
gap: 1em;
&-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-dark;
padding: 0.35em;
border-radius: 10px;
z-index: 1;
}
&-container {
display: flex;
flex-direction: column;
gap: 1em;
}
&-grid {
display: grid;
gap: 1em;
margin-bottom: 1em;
grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
&-card {
display: grid;
grid-template-columns: 6em 1fr;
gap: 0.5em;
align-items: center;
color: white !important;
text-decoration: none;
padding: 0.5em;
background: rgb(255 255 255 / 0);
transition: background $transition-time-default;
border-radius: $border-radius-default;
&:hover {
background: rgb(255 255 255 / 0.1);
}
&-image,
&-icon {
width: 6em;
height: 6em;
object-fit: cover;
border-radius: 100%;
box-shadow: $shadow-card-image;
}
&-icon {
display: flex;
align-items: center;
justify-content: center;
font-size: 1em;
background: rgb(255 255 255 / 0.1);
.material-symbols-rounded {
font-size: 3em;
}
}
}
}
&-link {
color: white;
text-decoration-color: rgb(255 255 255 / 0.5);
+1 -1
View File
@@ -345,7 +345,7 @@ const MusicAlbumTitlePage = () => {
<NavLink
className="item-detail-cast-card"
key={artist.Id}
to={`/person/${artist.Id}`}
to={`/artist/${artist.Id}`}
>
<div
style={{
+5 -3
View File
@@ -1,4 +1,4 @@
import React, { useState } from "react";
import React, { useEffect, useState } from "react";
import { useQuery } from "@tanstack/react-query";
@@ -70,7 +70,6 @@ const Home = () => {
ItemFields.MediaStreams,
ItemFields.MediaSources,
],
// limit: 16,
enableUserData: true,
enableImages: true,
});
@@ -136,7 +135,9 @@ const Home = () => {
const excludeTypes = ["boxsets", "playlists", "livetv", "channels"];
let tempData = [];
if (libraries.status === "success") {
useEffect(() => {
if (libraries.isSuccess) {
libraries.data.Items.map((lib) => {
if (excludeTypes.includes(lib.CollectionType)) {
return;
@@ -152,6 +153,7 @@ const Home = () => {
}
});
}
}, [libraries.isSuccess]);
if (user.isPaused) {
user.refetch();