fix genre view in library page

This commit is contained in:
Prayag Prajapati committed 2023-11-28 18:16:37 +05:30
1 parent 81d188ac5a
commit d6d81f2b4d
4 files changed
+21 -28

No files matched your search

+4 -4
View File
@@ -101,7 +101,7 @@ export const Card = ({
aspectRatio: cardImageAspectRatios[cardType],
}}
>
{!!item.UserData && (
{/* {!!item.UserData && (
<>
<div
className="card-indicator check"
@@ -133,8 +133,8 @@ export const Card = ({
</Typography>
</div>
</>
)}
{!!imageBlurhash && (
)} */}
{/* {!!imageBlurhash && (
<Blurhash
hash={imageBlurhash}
width={128}
@@ -143,7 +143,7 @@ export const Card = ({
resolutionY={24}
className="card-image-blurhash"
/>
)}
)} */}
<div className="card-image-icon-container">
{overrideIcon
? getTypeIcon(overrideIcon)
+8 -1
View File
@@ -23,6 +23,7 @@
z-index: 1;
top: 0;
left: 0;
transition: filter $transition-time-default;
&-container {
position: relative;
width: 100%;
@@ -43,6 +44,7 @@
z-index: 0;
top: 0;
left: 0;
transition: filter $transition-time-default;
.material-symbols-rounded {
position: absolute;
top: 50%;
@@ -70,7 +72,6 @@
height: 100%;
left: 0;
top: 0;
background: rgb(0 0 0 / 0.6);
z-index: 10;
opacity: 0;
transition: opacity $transition-time-default;
@@ -83,6 +84,12 @@
&:hover,
&:focus,
&:focus-within {
.card-image {
filter: brightness(0.6);
}
.card-image-icon-container {
filter: brightness(0.6);
}
.card-overlay {
opacity: 1;
}
@@ -6,6 +6,7 @@ import { useQuery } from "@tanstack/react-query";
import { Card } from "../../../card/card";
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
import { useApi } from "../../../../utils/store/api";
import { CardScroller } from "../../../cardScroller/cardScroller";
const GenreView = ({ libraryId, genreId, genreName, userId }) => {
const [api] = useApi((state) => [state.api]);
@@ -23,26 +24,15 @@ const GenreView = ({ libraryId, genreId, genreName, userId }) => {
if (items.isSuccess && items.data.Items.length > 0) {
return (
<div className="library-genre">
<div className="library-genre-header">
<div className="library-genre-header-decoration"></div>
<Typography
noWrap
variant="h5"
color="textPrimary"
className=""
>
{genreName}
</Typography>
</div>
<div
className="library-grid"
style={{
paddingTop: "0.5em",
}}
<CardScroller
title={genreName}
displayCards={8}
disableDecoration
>
{items.data.Items.map((item, index) => {
return (
<Card
key={index}
item={item}
seriesId={item.SeriesId}
cardTitle={
@@ -109,7 +99,7 @@ const GenreView = ({ libraryId, genreId, genreName, userId }) => {
/>
);
})}
</div>
</CardScroller>
</div>
);
}
+2 -6
View File
@@ -130,7 +130,6 @@ const LibraryView = () => {
if (currentLib.isError) {
console.error(currentLib.error);
}
console.log(currentLib.isSuccess);
if (currentLib.isSuccess) {
setViewType(null);
if (currentLib.data.CollectionType == "movies") {
@@ -875,7 +874,7 @@ const LibraryView = () => {
/>
</AccordionDetails>
</Accordion>
{currentLib.data.Items[0]
{currentLib.data
.CollectionType ==
"movies" && (
<Accordion className="library-filter-accordian">
@@ -1098,7 +1097,6 @@ const LibraryView = () => {
)}
{!onlyStatusFilterViews.includes(
currentLib.data
.Items[0]
.CollectionType,
) && (
<Accordion className="library-filter-accordian">
@@ -1308,9 +1306,7 @@ const LibraryView = () => {
return (
<GenreView
key={item.Id}
libraryId={
currentLib.data.Items[0].Id
}
libraryId={currentLib.data.Id}
genreId={item.Id}
genreName={item.Name}
userId={user.data.Id}