diff --git a/src/components/carouselSlide/index.jsx b/src/components/carouselSlide/index.jsx index 2dd362b..35dfdfb 100644 --- a/src/components/carouselSlide/index.jsx +++ b/src/components/carouselSlide/index.jsx @@ -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" diff --git a/src/routes/album/album.module.scss b/src/routes/album/album.module.scss index 0992c56..89c7ed0 100644 --- a/src/routes/album/album.module.scss +++ b/src/routes/album/album.module.scss @@ -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); diff --git a/src/routes/album/index.jsx b/src/routes/album/index.jsx index 12db136..c0f0896 100644 --- a/src/routes/album/index.jsx +++ b/src/routes/album/index.jsx @@ -345,7 +345,7 @@ const MusicAlbumTitlePage = () => {
{ ItemFields.MediaStreams, ItemFields.MediaSources, ], - // limit: 16, enableUserData: true, enableImages: true, }); @@ -136,22 +135,25 @@ const Home = () => { const excludeTypes = ["boxsets", "playlists", "livetv", "channels"]; let tempData = []; - if (libraries.status === "success") { - libraries.data.Items.map((lib) => { - if (excludeTypes.includes(lib.CollectionType)) { - return; - } - tempData = latestMediaLibs; - if ( - !tempData.some( - (el) => JSON.stringify(el) === JSON.stringify([lib.Id, lib.Name]), - ) - ) { - tempData.push([lib.Id, lib.Name]); - setLatestMediaLibs(tempData); - } - }); - } + + useEffect(() => { + if (libraries.isSuccess) { + libraries.data.Items.map((lib) => { + if (excludeTypes.includes(lib.CollectionType)) { + return; + } + tempData = latestMediaLibs; + if ( + !tempData.some( + (el) => JSON.stringify(el) === JSON.stringify([lib.Id, lib.Name]), + ) + ) { + tempData.push([lib.Id, lib.Name]); + setLatestMediaLibs(tempData); + } + }); + } + }, [libraries.isSuccess]); if (user.isPaused) { user.refetch();