chore(web): Implement new ArtistPage and add new TracksList component #243
This commit is contained in:
21 files changed
+680
-260
No files matched your search
+1
-1
@@ -402,7 +402,7 @@ function AppReady() {
|
|||||||
opacity: 0,
|
opacity: 0,
|
||||||
}}
|
}}
|
||||||
animate={{
|
animate={{
|
||||||
opacity: backdropLoading ? 0 : 0.6,
|
opacity: backdropLoading ? 0 : 1,
|
||||||
}}
|
}}
|
||||||
exit={{
|
exit={{
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
|
|||||||
@@ -2,17 +2,19 @@
|
|||||||
.album {
|
.album {
|
||||||
&-image {
|
&-image {
|
||||||
aspect-ratio: 1;
|
aspect-ratio: 1;
|
||||||
border-radius: 10px;
|
border-radius: 20px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
width: 12em;
|
width: 16em;
|
||||||
box-shadow: 0 0 10px rgb(0 0 0 /0.2);
|
height: 16em;
|
||||||
|
box-shadow: $shadow-card-image;
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 12em;
|
|
||||||
&-icon {
|
&-icon {
|
||||||
fill: url(#clr-gradient-default) !important;
|
color: rgb(255 255 255 / 0.5);
|
||||||
|
font-variation-settings: "FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40;
|
||||||
|
|
||||||
|
|
||||||
&-container {
|
&-container {
|
||||||
background: $clr-gradient-dark;
|
background: $clr-background-card-icon;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ import { SortOrder } from "@jellyfin/sdk/lib/generated-client";
|
|||||||
import { useApi } from "../../../utils/store/api";
|
import { useApi } from "../../../utils/store/api";
|
||||||
import { useAudioPlayback } from "../../../utils/store/audioPlayback";
|
import { useAudioPlayback } from "../../../utils/store/audioPlayback";
|
||||||
import LikeButton from "../../buttons/likeButton";
|
import LikeButton from "../../buttons/likeButton";
|
||||||
|
import PlayButton from "../../buttons/playButton";
|
||||||
|
|
||||||
|
import TrackList from "../tracksList/index";
|
||||||
import "./albumArtist.scss";
|
import "./albumArtist.scss";
|
||||||
|
|
||||||
export const ArtistAlbum = ({ user, album, boxProps }) => {
|
export const ArtistAlbum = ({ user, album, boxProps }) => {
|
||||||
@@ -35,8 +38,6 @@ export const ArtistAlbum = ({ user, album, boxProps }) => {
|
|||||||
networkMode: "always",
|
networkMode: "always",
|
||||||
});
|
});
|
||||||
|
|
||||||
const [imgLoaded, setImgLoaded] = useState(false);
|
|
||||||
|
|
||||||
const [
|
const [
|
||||||
currentTrackItem,
|
currentTrackItem,
|
||||||
setCurrentAudioTrack,
|
setCurrentAudioTrack,
|
||||||
@@ -75,57 +76,109 @@ export const ArtistAlbum = ({ user, album, boxProps }) => {
|
|||||||
{!!album.ImageTags?.Primary && (
|
{!!album.ImageTags?.Primary && (
|
||||||
<div className="album-image">
|
<div className="album-image">
|
||||||
<img
|
<img
|
||||||
|
alt={album.Name}
|
||||||
src={`${api.basePath}/Items/${album.Id}/Images/Primary?fillHeight=532&fillWidth=532&quality=96`}
|
src={`${api.basePath}/Items/${album.Id}/Images/Primary?fillHeight=532&fillWidth=532&quality=96`}
|
||||||
style={{
|
style={{
|
||||||
width: "100%",
|
width: "100%",
|
||||||
height: "100%",
|
height: "100%",
|
||||||
objectFit: "cover",
|
objectFit: "cover",
|
||||||
opacity: imgLoaded ? 1 : 0,
|
opacity: 0,
|
||||||
transition: "opacity 250ms",
|
transition: "opacity 250ms",
|
||||||
position: "relative",
|
position: "relative",
|
||||||
zIndex: 2,
|
zIndex: 2,
|
||||||
}}
|
}}
|
||||||
onLoad={() => setImgLoaded(true)}
|
onLoad={(e) => (e.currentTarget.style.opacity = 1)}
|
||||||
/>
|
/>
|
||||||
<div className="album-image-icon-container">
|
<div className="album-image-icon-container">
|
||||||
<span
|
<span
|
||||||
className="material-symbols-rounded album-image-icon"
|
className="material-symbols-rounded album-image-icon"
|
||||||
sx={{ fontSize: "6em" }}
|
style={{ fontSize: "8em" }}
|
||||||
>
|
>
|
||||||
schedule
|
album
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<Stack>
|
<div
|
||||||
<Typography variant="h5" style={{ opacity: "0.6", mb: 1 }}>
|
className="flex flex-column"
|
||||||
|
style={{
|
||||||
|
alignItems: "flex-start",
|
||||||
|
justifyContent: "space-between",
|
||||||
|
padding: "1em 0",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div className="flex flex-column">
|
||||||
|
<Typography
|
||||||
|
variant="h4"
|
||||||
|
fontWeight={300}
|
||||||
|
style={{ opacity: "0.6", mb: 1 }}
|
||||||
|
>
|
||||||
{album.ProductionYear}
|
{album.ProductionYear}
|
||||||
</Typography>
|
</Typography>
|
||||||
<MuiLink
|
<MuiLink
|
||||||
component={Link}
|
component={Link}
|
||||||
to={`/musicalbum/${album.Id}`}
|
to={`/musicalbum/${album.Id}`}
|
||||||
variant="h3"
|
variant="h2"
|
||||||
color="inherit"
|
color="inherit"
|
||||||
underline="hover"
|
underline="hover"
|
||||||
>
|
>
|
||||||
{album.Name}
|
{album.Name}
|
||||||
</MuiLink>
|
</MuiLink>
|
||||||
</Stack>
|
</div>
|
||||||
|
<div
|
||||||
|
className=" flex flex-row"
|
||||||
|
style={{
|
||||||
|
gap: "1em",
|
||||||
|
alignItems: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<PlayButton
|
||||||
|
audio
|
||||||
|
itemId={album.Id}
|
||||||
|
itemType={album.Type}
|
||||||
|
itemUserData={album.UserData}
|
||||||
|
userId={user.Id}
|
||||||
|
buttonProps={{
|
||||||
|
color: "white",
|
||||||
|
style: {
|
||||||
|
color: "black ",
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<LikeButton
|
||||||
|
itemName={album.Name}
|
||||||
|
key={album.Id}
|
||||||
|
queryKey={[
|
||||||
|
"item",
|
||||||
|
album.ParentBackdropItemId,
|
||||||
|
"artist",
|
||||||
|
"discography",
|
||||||
|
]}
|
||||||
|
isFavorite={album.UserData.IsFavorite}
|
||||||
|
itemId={album.Id}
|
||||||
|
itemType={album.Type}
|
||||||
|
itemUserData={album.UserData}
|
||||||
|
userId={user.Id}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{albumTracks.isSuccess && (
|
{albumTracks.isSuccess && (
|
||||||
<Paper
|
<TrackList user={user} tracks={albumTracks.data.Items} />
|
||||||
className="item-detail-album-tracks"
|
)}
|
||||||
style={{
|
</div>
|
||||||
marginBottom: "1.2em",
|
);
|
||||||
}}
|
};
|
||||||
>
|
|
||||||
<div
|
{
|
||||||
|
/* <div
|
||||||
key={0}
|
key={0}
|
||||||
className="item-detail-album-track"
|
className="item-detail-album-track"
|
||||||
style={{
|
style={{
|
||||||
padding: "0.75em 0 ",
|
padding: "0.75em 0 ",
|
||||||
background: "hsl(256, 100%, 4%, 60%)",
|
background: "rgb(0 0 0 / 0.6)",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography
|
<Typography
|
||||||
@@ -149,7 +202,7 @@ export const ArtistAlbum = ({ user, album, boxProps }) => {
|
|||||||
</Typography>
|
</Typography>
|
||||||
<span className="material-symbols-rounded">schedule</span>
|
<span className="material-symbols-rounded">schedule</span>
|
||||||
</div>
|
</div>
|
||||||
{albumTracks.data.Items.map((track, index) => {
|
{/*albumTracks.data.Items.map((track, index) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
key={track.Id}
|
key={track.Id}
|
||||||
@@ -218,9 +271,5 @@ export const ArtistAlbum = ({ user, album, boxProps }) => {
|
|||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})*/
|
||||||
</Paper>
|
}
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
// Types
|
||||||
|
import { BaseItemDto, UserDto } from "@jellyfin/sdk/lib/generated-client";
|
||||||
|
|
||||||
|
import { getRuntimeMusic } from "../../../utils/date/time";
|
||||||
|
import { useApi } from "../../../utils/store/api";
|
||||||
|
import { useAudioPlayback } from "../../../utils/store/audioPlayback";
|
||||||
|
import LikeButton from "../../buttons/likeButton";
|
||||||
|
import "./tracksList.module.scss";
|
||||||
|
|
||||||
|
export default function TracksList({
|
||||||
|
tracks,
|
||||||
|
user,
|
||||||
|
queryKey,
|
||||||
|
}: { tracks: BaseItemDto[]; user: UserDto; queryKey: [] }) {
|
||||||
|
const [api] = useApi((state) => [state.api]);
|
||||||
|
|
||||||
|
const [
|
||||||
|
currentItem,
|
||||||
|
setCurrentAudioTrack,
|
||||||
|
setAudioUrl,
|
||||||
|
setAudioDisplay,
|
||||||
|
setAudioItem,
|
||||||
|
setAudioTracks,
|
||||||
|
] = useAudioPlayback((state) => [
|
||||||
|
state.item,
|
||||||
|
state.setCurrentTrack,
|
||||||
|
state.setUrl,
|
||||||
|
state.setDisplay,
|
||||||
|
state.setItem,
|
||||||
|
state.setTracks,
|
||||||
|
]);
|
||||||
|
const playTrack = (index: number) => {
|
||||||
|
setAudioTracks(tracks);
|
||||||
|
setCurrentAudioTrack(index);
|
||||||
|
setAudioUrl(
|
||||||
|
`${api.basePath}/Audio/${tracks[index].Id}/universal?deviceId=${api.deviceInfo.id}&userId=${user.Id}&api_key=${api.accessToken}`,
|
||||||
|
);
|
||||||
|
setAudioItem(tracks[index]);
|
||||||
|
setAudioDisplay(true);
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<div className="track-list">
|
||||||
|
<div className="track track-header">
|
||||||
|
<Typography variant="h6">#</Typography>
|
||||||
|
<div>{""}</div>
|
||||||
|
<Typography
|
||||||
|
variant="h6"
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Name
|
||||||
|
</Typography>
|
||||||
|
<span className="material-symbols-rounded">schedule</span>
|
||||||
|
</div>
|
||||||
|
{tracks.map((track, index) => (
|
||||||
|
<div
|
||||||
|
className={currentItem.Id === track.Id ? "track playing" : "track"}
|
||||||
|
key={track.Id}
|
||||||
|
onClick={() => playTrack(index)}
|
||||||
|
>
|
||||||
|
{currentItem.Id === track.Id ? (
|
||||||
|
<span className="material-symbols-rounded ">equalizer</span>
|
||||||
|
) : (
|
||||||
|
<Typography>{track.IndexNumber ?? "-"}</Typography>
|
||||||
|
)}
|
||||||
|
<LikeButton
|
||||||
|
itemId={track.Id}
|
||||||
|
isFavorite={track.UserData?.IsFavorite}
|
||||||
|
queryKey={queryKey}
|
||||||
|
userId={user.Id}
|
||||||
|
itemName={track.Name}
|
||||||
|
/>
|
||||||
|
<Typography
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{track.Name}
|
||||||
|
</Typography>
|
||||||
|
<Typography>{getRuntimeMusic(track.RunTimeTicks)}</Typography>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
.track{
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 4% 1fr 80% 1fr;
|
||||||
|
align-items: center;
|
||||||
|
justify-items: center;
|
||||||
|
gap: 0.5em;
|
||||||
|
width: 100%;
|
||||||
|
transition: background $transition-time-default;
|
||||||
|
padding: 0.4em;
|
||||||
|
border-bottom: 1px solid rgb(255 255 255 / 0.1);
|
||||||
|
cursor: pointer;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
&:hover{
|
||||||
|
background: rgb(255 255 255 / 0.1);
|
||||||
|
}
|
||||||
|
&.playing {
|
||||||
|
background: rgb(255 255 255 / 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
&-list {
|
||||||
|
background: rgb(0 0 0 / 0.4);
|
||||||
|
backdrop-filter: blur(5px);
|
||||||
|
border-radius: 20px;
|
||||||
|
overflow: hidden;
|
||||||
|
border: 1px solid rgb(255 255 255 / 0.2);
|
||||||
|
}
|
||||||
|
&-header{
|
||||||
|
background: rgb(0 0 0 / 0.4) !important;
|
||||||
|
padding: 0.8em 0.4em;
|
||||||
|
}
|
||||||
|
> *:first-child {
|
||||||
|
justify-self: end;
|
||||||
|
}
|
||||||
|
&:last-child {
|
||||||
|
border-bottom: 0px solid !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
import Button from "@mui/material/Button";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import { useEffect, useRef, useState } from "react";
|
||||||
|
|
||||||
|
const ShowMoreText = ({ content, collapsedLines, extraProps }) => {
|
||||||
|
const [displayFull, setDisplayFull] = useState(false);
|
||||||
|
const [isOverflowing, setIsOverflowing] = useState(false);
|
||||||
|
const textRef = useRef(null);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (textRef.current) {
|
||||||
|
if (textRef.current.offsetHeight < textRef.current.scrollHeight) {
|
||||||
|
setIsOverflowing(true);
|
||||||
|
} else {
|
||||||
|
setIsOverflowing(false);
|
||||||
|
}
|
||||||
|
// textRef.current.
|
||||||
|
}
|
||||||
|
}, []);
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className="flex flex-column"
|
||||||
|
{...extraProps}
|
||||||
|
style={{
|
||||||
|
alignItems: "flex-end",
|
||||||
|
gap: "1em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Typography
|
||||||
|
ref={textRef}
|
||||||
|
key={displayFull}
|
||||||
|
style={{
|
||||||
|
display: "-webkit-box",
|
||||||
|
textOverflow: "ellipsis",
|
||||||
|
overflow: "hidden",
|
||||||
|
WebkitLineClamp: displayFull ? "none" : collapsedLines ?? 2,
|
||||||
|
WebkitBoxOrient: "vertical",
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{content}
|
||||||
|
</Typography>
|
||||||
|
{content.length > 0 && isOverflowing && (
|
||||||
|
<Button
|
||||||
|
color="white"
|
||||||
|
variant="outlined"
|
||||||
|
onClick={() => setDisplayFull((state) => !state)}
|
||||||
|
// key={displayFull}
|
||||||
|
>
|
||||||
|
{displayFull ? "Show less" : "Show more"}
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export default ShowMoreText;
|
||||||
@@ -107,9 +107,9 @@ $border-radius: 20px;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.item {
|
.item-album.item {
|
||||||
gap: 1em;
|
gap: 1em;
|
||||||
&-hero {
|
.item-hero {
|
||||||
height: 50vh;
|
height: 50vh;
|
||||||
gap: 2em;
|
gap: 2em;
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -181,14 +181,72 @@ $border-radius: 20px;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&-detail {
|
.item-detail {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 5px 35%;
|
grid-template-columns: 1fr 5px 35%;
|
||||||
justify-items: center;
|
justify-items: center;
|
||||||
align-items: start;
|
align-items: start;
|
||||||
gap: 1em;
|
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: black;
|
||||||
|
border:1px solid rgb(255 255 255 / 0.2) ;
|
||||||
|
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));
|
||||||
|
}
|
||||||
|
&-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 {
|
&-link {
|
||||||
color: white;
|
color: white;
|
||||||
text-decoration-color: rgb(255 255 255 / 0.5);
|
text-decoration-color: rgb(255 255 255 / 0.5);
|
||||||
@@ -196,6 +254,14 @@ $border-radius: 20px;
|
|||||||
text-decoration-color: white;
|
text-decoration-color: white;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&-episodes-container {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||||
|
gap: 0.25em;
|
||||||
|
margin-top: 0.5em;
|
||||||
|
align-items: start;
|
||||||
|
justify-items: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+17
-134
@@ -35,7 +35,10 @@ import { CardScroller } from "../../components/cardScroller/cardScroller";
|
|||||||
import LikeButton from "../../components/buttons/likeButton";
|
import LikeButton from "../../components/buttons/likeButton";
|
||||||
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
||||||
import PlayButton from "../../components/buttons/playButton";
|
import PlayButton from "../../components/buttons/playButton";
|
||||||
|
import TrackList from "../../components/layouts/tracksList";
|
||||||
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
||||||
|
import ShowMoreText from "../../components/showMoreText";
|
||||||
|
|
||||||
import { getTypeIcon } from "../../components/utils/iconsCollection";
|
import { getTypeIcon } from "../../components/utils/iconsCollection";
|
||||||
import { useApi } from "../../utils/store/api";
|
import { useApi } from "../../utils/store/api";
|
||||||
import { useAudioPlayback } from "../../utils/store/audioPlayback";
|
import { useAudioPlayback } from "../../utils/store/audioPlayback";
|
||||||
@@ -196,7 +199,7 @@ const MusicAlbumTitlePage = () => {
|
|||||||
duration: 0.25,
|
duration: 0.25,
|
||||||
ease: "easeInOut",
|
ease: "easeInOut",
|
||||||
}}
|
}}
|
||||||
className="scrollY padded-top item-album"
|
className="scrollY padded-top item item-album"
|
||||||
>
|
>
|
||||||
<div className="item-hero flex flex-row">
|
<div className="item-hero flex flex-row">
|
||||||
<div className="item-hero-backdrop-container">
|
<div className="item-hero-backdrop-container">
|
||||||
@@ -301,12 +304,17 @@ const MusicAlbumTitlePage = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="item-detail">
|
<div
|
||||||
|
className="item-detail"
|
||||||
|
style={{
|
||||||
|
marginBottom: "1em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
<div style={{ width: "100%" }}>
|
<div style={{ width: "100%" }}>
|
||||||
<Typography variant="subtitle1" style={{ display: "block" }}>
|
<ShowMoreText
|
||||||
{item.data.Overview ?? ""}
|
content={item.data.Overview ?? ""}
|
||||||
</Typography>
|
collapsedLines={4}
|
||||||
<Divider flexItem orientation="vertical" />
|
/>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
@@ -328,7 +336,7 @@ const MusicAlbumTitlePage = () => {
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Divider />
|
<Divider flexItem orientation="vertical" />
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
width: "100%",
|
width: "100%",
|
||||||
@@ -393,133 +401,8 @@ const MusicAlbumTitlePage = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{musicTracks.isPending ? (
|
{musicTracks.isSuccess && musicTracks.data.TotalRecordCount > 0 && (
|
||||||
<></>
|
<TrackList user={user.data.Id} tracks={musicTracks.data.Items} />
|
||||||
) : (
|
|
||||||
musicTracks.data.TotalRecordCount > 0 && (
|
|
||||||
<Paper
|
|
||||||
className="item-detail-album-tracks"
|
|
||||||
style={{
|
|
||||||
marginTop: "1.2em",
|
|
||||||
marginBottom: "1.2em",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
key={0}
|
|
||||||
className="item-detail-album-track"
|
|
||||||
style={{
|
|
||||||
padding: "0.75em 0 ",
|
|
||||||
background: "rgb(0 0 0 / 0.6)",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Typography
|
|
||||||
variant="h6"
|
|
||||||
fontWeight={400}
|
|
||||||
style={{
|
|
||||||
justifySelf: "end",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
#
|
|
||||||
</Typography>
|
|
||||||
<div />
|
|
||||||
<Typography
|
|
||||||
variant="h6"
|
|
||||||
style={{
|
|
||||||
justifySelf: "start",
|
|
||||||
}}
|
|
||||||
fontWeight={400}
|
|
||||||
>
|
|
||||||
Name
|
|
||||||
</Typography>
|
|
||||||
<span className="material-symbols-rounded">schedule</span>
|
|
||||||
</div>
|
|
||||||
{musicTracks.data.Items.map((track, index) => {
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
key={track.Id}
|
|
||||||
className={
|
|
||||||
currentTrackItem.Id === track.Id &&
|
|
||||||
currentTrackItem.ParentId === track.ParentId
|
|
||||||
? "item-detail-album-track playing"
|
|
||||||
: "item-detail-album-track"
|
|
||||||
}
|
|
||||||
onClick={() => playTrack(index)}
|
|
||||||
>
|
|
||||||
<Typography
|
|
||||||
variant="subtitle1"
|
|
||||||
style={{
|
|
||||||
justifySelf: "end",
|
|
||||||
display: "flex",
|
|
||||||
alignItems: "center",
|
|
||||||
justifyContent: "center",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{(currentTrackItem.Id === track.Id &&
|
|
||||||
currentTrackItem.ParentId === track.ParentId ? (
|
|
||||||
<div
|
|
||||||
className="material-symbols-rounded"
|
|
||||||
style={{
|
|
||||||
height: "100%",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
equalizer
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
track.IndexNumber
|
|
||||||
)) ?? "-"}
|
|
||||||
</Typography>
|
|
||||||
|
|
||||||
<LikeButton
|
|
||||||
itemId={track.Id}
|
|
||||||
isFavorite={track.UserData?.IsFavorite}
|
|
||||||
queryKey={["item", id, "musicTracks"]}
|
|
||||||
userId={user.data.Id}
|
|
||||||
itemName={track.Name}
|
|
||||||
color={
|
|
||||||
currentTrackItem.Id === track.Id &&
|
|
||||||
currentTrackItem.ParentId === track.ParentId
|
|
||||||
? "hsl(337, 96%, 56%)"
|
|
||||||
: "white"
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
display: "flex",
|
|
||||||
flexDirection: "column",
|
|
||||||
width: "100%",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Typography
|
|
||||||
variant="subtitle1"
|
|
||||||
style={{
|
|
||||||
justifySelf: "start",
|
|
||||||
}}
|
|
||||||
fontWeight={500}
|
|
||||||
>
|
|
||||||
{track.Name}
|
|
||||||
</Typography>
|
|
||||||
{track.AlbumArtist === "Various Artists" && (
|
|
||||||
<Typography
|
|
||||||
variant="subtitle2"
|
|
||||||
style={{
|
|
||||||
opacity: 0.5,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{track.ArtistItems.map((artist) => artist.Name).join(
|
|
||||||
", ",
|
|
||||||
)}
|
|
||||||
</Typography>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
<Typography variant="subtitle1">
|
|
||||||
{getRuntimeMusic(track.RunTimeTicks)}
|
|
||||||
</Typography>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</Paper>
|
|
||||||
)
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{similarItems.data.TotalRecordCount > 0 && (
|
{similarItems.data.TotalRecordCount > 0 && (
|
||||||
|
|||||||
@@ -1,4 +1,140 @@
|
|||||||
|
.item-artist.item {
|
||||||
|
gap: 1em;
|
||||||
|
.item-hero {
|
||||||
|
height: 50vh;
|
||||||
|
gap: 2em;
|
||||||
|
position: relative;
|
||||||
|
align-items: center;
|
||||||
|
&-image {
|
||||||
|
opacity: 0;
|
||||||
|
width: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
transition: opacity $transition-time-default;
|
||||||
|
&-container {
|
||||||
|
height: fit-content;
|
||||||
|
max-height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
border-radius: $border-radius-default;
|
||||||
|
box-shadow: $shadow-card;
|
||||||
|
flex-grow: 1;
|
||||||
|
flex-shrink: 0;
|
||||||
|
position: relative;
|
||||||
|
width: 18% !important;
|
||||||
|
}
|
||||||
|
&-blurhash {
|
||||||
|
position: absolute !important;
|
||||||
|
width: 100% !important;
|
||||||
|
height: 100% !important;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&-logo {
|
||||||
|
max-width: 42rem;
|
||||||
|
max-height: 10rem;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity $transition-time-default;
|
||||||
|
object-position: bottom;
|
||||||
|
}
|
||||||
|
&-detail {
|
||||||
|
width: 100%;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 1em;
|
||||||
|
justify-content: end;
|
||||||
|
}
|
||||||
|
&-buttons {
|
||||||
|
&-container {
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&-backdrop {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
object-position: top;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity $transition-time-default;
|
||||||
|
&-container {
|
||||||
|
filter: brightness(0.8);
|
||||||
|
position: absolute;
|
||||||
|
top: -4.4em;
|
||||||
|
left: -1.6em;
|
||||||
|
width: 100vw;
|
||||||
|
height: calc(50vh + 4.4em);
|
||||||
|
z-index: -1;
|
||||||
|
mask-image: linear-gradient(to top, transparent, black);
|
||||||
|
-webkit-mask-image: linear-gradient(
|
||||||
|
to top,
|
||||||
|
transparent,
|
||||||
|
black
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-detail {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 5px 35%;
|
||||||
|
justify-items: center;
|
||||||
|
align-items: start;
|
||||||
|
gap: 1em;
|
||||||
|
|
||||||
|
&-cast {
|
||||||
|
&-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1em;
|
||||||
|
}
|
||||||
|
&-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(5, minmax(0, 1fr));
|
||||||
|
gap: 1em;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
}
|
||||||
|
&-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);
|
||||||
|
&:hover {
|
||||||
|
text-decoration-color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.item-detail-artist {
|
.item-detail-artist {
|
||||||
&-container {
|
&-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
+138
-29
@@ -1,15 +1,16 @@
|
|||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import React, { useState, useEffect } from "react";
|
import React, { useState, useEffect, useLayoutEffect } from "react";
|
||||||
|
|
||||||
import Box from "@mui/material/Box";
|
import Box from "@mui/material/Box";
|
||||||
import CircularProgress from "@mui/material/CircularProgress";
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
import Divider from "@mui/material/Divider";
|
import Divider from "@mui/material/Divider";
|
||||||
import Tab from "@mui/material/Tab";
|
import Tab from "@mui/material/Tab";
|
||||||
import Tabs from "@mui/material/Tabs";
|
import Tabs from "@mui/material/Tabs";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
|
||||||
import { AnimatePresence, motion } from "framer-motion";
|
import { AnimatePresence, motion } from "framer-motion";
|
||||||
|
|
||||||
import { useParams } from "react-router-dom";
|
import { Link, useParams } from "react-router-dom";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
BaseItemKind,
|
BaseItemKind,
|
||||||
@@ -22,14 +23,17 @@ import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api"
|
|||||||
|
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
|
|
||||||
|
import { Blurhash } from "react-blurhash";
|
||||||
|
import LikeButton from "../../components/buttons/likeButton";
|
||||||
import { Card } from "../../components/card/card";
|
import { Card } from "../../components/card/card";
|
||||||
import Hero from "../../components/layouts/item/hero";
|
|
||||||
|
|
||||||
|
import meshBg from "../../assets/herobg.png";
|
||||||
import { ArtistAlbum } from "../../components/layouts/artist/artistAlbum";
|
import { ArtistAlbum } from "../../components/layouts/artist/artistAlbum";
|
||||||
import MusicTrack from "../../components/musicTrack";
|
import MusicTrack from "../../components/musicTrack";
|
||||||
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
||||||
|
import ShowMoreText from "../../components/showMoreText";
|
||||||
import { useApi } from "../../utils/store/api";
|
import { useApi } from "../../utils/store/api";
|
||||||
import { useBackdropStore } from "../../utils/store/backdrop";
|
import { setBackdrop, useBackdropStore } from "../../utils/store/backdrop";
|
||||||
import "./artist.module.scss";
|
import "./artist.module.scss";
|
||||||
|
|
||||||
function TabPanel(props) {
|
function TabPanel(props) {
|
||||||
@@ -98,7 +102,6 @@ const ArtistTitlePage = () => {
|
|||||||
return result.data;
|
return result.data;
|
||||||
},
|
},
|
||||||
enabled: item.isSuccess && item.data.Type === BaseItemKind.MusicArtist,
|
enabled: item.isSuccess && item.data.Type === BaseItemKind.MusicArtist,
|
||||||
networkMode: "always",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const artistSongs = useQuery({
|
const artistSongs = useQuery({
|
||||||
@@ -116,7 +119,6 @@ const ArtistTitlePage = () => {
|
|||||||
return result.data;
|
return result.data;
|
||||||
},
|
},
|
||||||
enabled: item.isSuccess && item.data.Type === BaseItemKind.MusicArtist,
|
enabled: item.isSuccess && item.data.Type === BaseItemKind.MusicArtist,
|
||||||
networkMode: "always",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const artistAppearances = useQuery({
|
const artistAppearances = useQuery({
|
||||||
@@ -134,7 +136,6 @@ const ArtistTitlePage = () => {
|
|||||||
return result.data;
|
return result.data;
|
||||||
},
|
},
|
||||||
enabled: item.isSuccess && item.data.Type === BaseItemKind.MusicArtist,
|
enabled: item.isSuccess && item.data.Type === BaseItemKind.MusicArtist,
|
||||||
networkMode: "always",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const artistTabs = [
|
const artistTabs = [
|
||||||
@@ -144,7 +145,7 @@ const ArtistTitlePage = () => {
|
|||||||
];
|
];
|
||||||
const [activeArtistTab, setActiveArtistTab] = useState(0);
|
const [activeArtistTab, setActiveArtistTab] = useState(0);
|
||||||
|
|
||||||
useEffect(() => {
|
useLayoutEffect(() => {
|
||||||
if (
|
if (
|
||||||
artistDiscography.isSuccess &&
|
artistDiscography.isSuccess &&
|
||||||
artistSongs.isSuccess &&
|
artistSongs.isSuccess &&
|
||||||
@@ -158,23 +159,22 @@ const ArtistTitlePage = () => {
|
|||||||
setActiveArtistTab(2);
|
setActiveArtistTab(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, []);
|
}, [
|
||||||
|
artistDiscography.isSuccess,
|
||||||
|
artistSongs.isSuccess,
|
||||||
|
artistAppearances.isSuccess,
|
||||||
|
]);
|
||||||
|
|
||||||
const [animationDirection, setAnimationDirection] = useState("forward");
|
const [animationDirection, setAnimationDirection] = useState("forward");
|
||||||
|
|
||||||
const [setAppBackdrop] = useBackdropStore((state) => [state.setBackdrop]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (item.isSuccess) {
|
if (item.isSuccess) {
|
||||||
setAppBackdrop(
|
setBackdrop(
|
||||||
item.data.Type === BaseItemKind.MusicAlbum ||
|
`${api.basePath}/Items/${item.data.Id}/Images/Backdrop`,
|
||||||
item.data.Type === BaseItemKind.Episode
|
|
||||||
? `${api.basePath}/Items/${item.data.ParentBackdropItemId}/Images/Backdrop`
|
|
||||||
: `${api.basePath}/Items/${item.data.Id}/Images/Backdrop`,
|
|
||||||
item.data.Id,
|
item.data.Id,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}, []);
|
}, [item.isSuccess]);
|
||||||
|
|
||||||
if (item.isPending) {
|
if (item.isPending) {
|
||||||
return (
|
return (
|
||||||
@@ -205,23 +205,132 @@ const ArtistTitlePage = () => {
|
|||||||
duration: 0.25,
|
duration: 0.25,
|
||||||
ease: "easeInOut",
|
ease: "easeInOut",
|
||||||
}}
|
}}
|
||||||
className="scrollY"
|
className="scrollY item item-artist"
|
||||||
|
>
|
||||||
|
<div className="item-hero flex flex-row">
|
||||||
|
<div className="item-hero-backdrop-container">
|
||||||
|
<img
|
||||||
|
alt={item.data.Name}
|
||||||
|
src={api.getItemImageUrl(item.data.Id, "Backdrop", {
|
||||||
|
tag: item.data.BackdropImageTags[0],
|
||||||
|
})}
|
||||||
|
className="item-hero-backdrop"
|
||||||
|
onLoad={(e) => {
|
||||||
|
e.currentTarget.style.opacity = 1;
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
className="item-hero-image-container"
|
||||||
style={{
|
style={{
|
||||||
padding: "5em 2em 2em 1em",
|
aspectRatio: item.data.PrimaryImageAspectRatio ?? 1,
|
||||||
display: "flex",
|
|
||||||
flexDirection: "column",
|
|
||||||
gap: "0.5em",
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Hero
|
{Object.keys(item.data.ImageTags).includes("Primary") ? (
|
||||||
item={item.data}
|
<>
|
||||||
userId={user.data.Id}
|
<Blurhash
|
||||||
queryKey={["item", id]}
|
hash={
|
||||||
disableMarkAsPlayedButton
|
item.data.ImageBlurHashes.Primary[
|
||||||
audioPlayButton
|
item.data.ImageTags.Primary
|
||||||
disableInfoStrip
|
]
|
||||||
|
}
|
||||||
|
className="item-hero-image-blurhash"
|
||||||
/>
|
/>
|
||||||
|
<img
|
||||||
|
alt={item.data.Name}
|
||||||
|
src={api.getItemImageUrl(item.data.Id, "Primary", {
|
||||||
|
quality: 90,
|
||||||
|
tag: item.data.ImageTags.Primary,
|
||||||
|
})}
|
||||||
|
onLoad={(e) => {
|
||||||
|
e.currentTarget.style.opacity = 1;
|
||||||
|
}}
|
||||||
|
className="item-hero-image"
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<></>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div className="item-hero-detail flex flex-column">
|
||||||
|
{Object.keys(item.data.ImageTags).includes("Logo") ? (
|
||||||
|
<img
|
||||||
|
alt={item.data.Name}
|
||||||
|
src={api.getItemImageUrl(item.data.Id, "Logo", {
|
||||||
|
quality: 90,
|
||||||
|
fillWidth: 592,
|
||||||
|
fillHeight: 592,
|
||||||
|
})}
|
||||||
|
onLoad={(e) => {
|
||||||
|
e.currentTarget.style.opacity = 1;
|
||||||
|
}}
|
||||||
|
className="item-hero-logo"
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<Typography variant="h3">{item.data.Name}</Typography>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<LikeButton
|
||||||
|
itemName={item.data.Name}
|
||||||
|
itemId={item.data.Id}
|
||||||
|
queryKey={["item", id]}
|
||||||
|
isFavorite={item.data.UserData.IsFavorite}
|
||||||
|
userId={user.data.Id}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="item-detail">
|
||||||
|
<div style={{ width: "100%", overflow: "hidden" }}>
|
||||||
|
<ShowMoreText
|
||||||
|
content={item.data.Overview ?? ""}
|
||||||
|
collapsedLines={4}
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
gap: "0.6em",
|
||||||
|
alignSelf: "end",
|
||||||
|
marginTop: "1em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{item.data.ExternalUrls.map((url) => (
|
||||||
|
<Link
|
||||||
|
key={url.Url}
|
||||||
|
target="_blank"
|
||||||
|
to={url.Url}
|
||||||
|
className="item-detail-link"
|
||||||
|
>
|
||||||
|
<Typography>{url.Name}</Typography>
|
||||||
|
</Link>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<Divider flexItem orientation="vertical" />
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{item.data.PremiereDate && (
|
||||||
|
<>
|
||||||
|
<Typography variant="h5">Born</Typography>
|
||||||
|
<Typography sx={{ opacity: 0.8 }}>
|
||||||
|
{new Date(item.data.PremiereDate).toDateString()}
|
||||||
|
</Typography>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{item.data.EndDate && (
|
||||||
|
<>
|
||||||
|
<Typography variant="h5" mt={2}>
|
||||||
|
Death
|
||||||
|
</Typography>
|
||||||
|
<Typography sx={{ opacity: 0.8 }}>
|
||||||
|
{new Date(item.data.EndDate).toDateString()}
|
||||||
|
</Typography>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div className="item-detail-artist-container">
|
<div className="item-detail-artist-container">
|
||||||
<div className="item-detail-artist-header">
|
<div className="item-detail-artist-header">
|
||||||
<Tabs
|
<Tabs
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
.item {
|
.item-episode.item {
|
||||||
gap: 1em;
|
gap: 1em;
|
||||||
&-hero {
|
.item-hero {
|
||||||
height: 50vh;
|
height: 50vh;
|
||||||
gap: 2em;
|
gap: 2em;
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -21,6 +21,8 @@
|
|||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
width: 26% !important;
|
||||||
|
max-width: 26% !important;
|
||||||
}
|
}
|
||||||
&-blurhash {
|
&-blurhash {
|
||||||
position: absolute !important;
|
position: absolute !important;
|
||||||
@@ -39,8 +41,8 @@
|
|||||||
&-detail {
|
&-detail {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: 1em;
|
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
|
gap: 0.5em;
|
||||||
}
|
}
|
||||||
&-buttons {
|
&-buttons {
|
||||||
&-container {
|
&-container {
|
||||||
@@ -74,7 +76,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&-detail {
|
.item-detail {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 5px 35%;
|
grid-template-columns: 1fr 5px 35%;
|
||||||
justify-items: center;
|
justify-items: center;
|
||||||
@@ -136,15 +138,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-episode {
|
|
||||||
.item-hero {
|
|
||||||
&-image-container {
|
|
||||||
width: 26% !important;
|
|
||||||
max-width: 26% !important;
|
|
||||||
}
|
|
||||||
&-detail {
|
|
||||||
gap: 0.5em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -37,6 +37,7 @@ import LikeButton from "../../components/buttons/likeButton";
|
|||||||
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
||||||
import PlayButton from "../../components/buttons/playButton";
|
import PlayButton from "../../components/buttons/playButton";
|
||||||
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
||||||
|
import ShowMoreText from "../../components/showMoreText";
|
||||||
import TextLink from "../../components/textLink";
|
import TextLink from "../../components/textLink";
|
||||||
import { getTypeIcon } from "../../components/utils/iconsCollection";
|
import { getTypeIcon } from "../../components/utils/iconsCollection";
|
||||||
import { endsAt, getRuntime } from "../../utils/date/time";
|
import { endsAt, getRuntime } from "../../utils/date/time";
|
||||||
@@ -571,9 +572,10 @@ const EpisodeTitlePage = () => {
|
|||||||
<Typography variant="h5" fontStyle="italic" mb={1}>
|
<Typography variant="h5" fontStyle="italic" mb={1}>
|
||||||
{item.data.Taglines[0] ?? ""}
|
{item.data.Taglines[0] ?? ""}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="subtitle1">
|
<ShowMoreText
|
||||||
{item.data.Overview ?? ""}
|
content={item.data.Overview ?? ""}
|
||||||
</Typography>
|
collapsedLines={4}
|
||||||
|
/>
|
||||||
{writers.length > 0 && (
|
{writers.length > 0 && (
|
||||||
<div className="hero-grid">
|
<div className="hero-grid">
|
||||||
<Typography
|
<Typography
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
|||||||
import LikeButton from "../../components/buttons/likeButton";
|
import LikeButton from "../../components/buttons/likeButton";
|
||||||
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
||||||
import PlayButton from "../../components/buttons/playButton";
|
import PlayButton from "../../components/buttons/playButton";
|
||||||
|
import ShowMoreText from "../../components/showMoreText";
|
||||||
import TextLink from "../../components/textLink";
|
import TextLink from "../../components/textLink";
|
||||||
import { getTypeIcon } from "../../components/utils/iconsCollection";
|
import { getTypeIcon } from "../../components/utils/iconsCollection";
|
||||||
import { endsAt, getRuntime } from "../../utils/date/time";
|
import { endsAt, getRuntime } from "../../utils/date/time";
|
||||||
@@ -281,7 +282,7 @@ const ItemDetail = () => {
|
|||||||
duration: 0.25,
|
duration: 0.25,
|
||||||
ease: "easeInOut",
|
ease: "easeInOut",
|
||||||
}}
|
}}
|
||||||
className="scrollY padded-top flex flex-column item"
|
className="scrollY padded-top flex flex-column item item-default"
|
||||||
>
|
>
|
||||||
<div className="item-hero flex flex-row">
|
<div className="item-hero flex flex-row">
|
||||||
<div className="item-hero-backdrop-container">
|
<div className="item-hero-backdrop-container">
|
||||||
@@ -586,9 +587,10 @@ const ItemDetail = () => {
|
|||||||
<Typography variant="h5" fontStyle="italic" mb={1}>
|
<Typography variant="h5" fontStyle="italic" mb={1}>
|
||||||
{item.data.Taglines[0] ?? ""}
|
{item.data.Taglines[0] ?? ""}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="subtitle1">
|
<ShowMoreText
|
||||||
{item.data.Overview ?? ""}
|
content={item.data.Overview ?? ""}
|
||||||
</Typography>
|
collapsedLines={4}
|
||||||
|
/>
|
||||||
{writers.length > 0 && (
|
{writers.length > 0 && (
|
||||||
<div className="hero-grid">
|
<div className="hero-grid">
|
||||||
<Typography
|
<Typography
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.item {
|
.item-default.item {
|
||||||
gap: 1em;
|
gap: 1em;
|
||||||
&-hero {
|
.item-hero {
|
||||||
height: 50vh;
|
height: 50vh;
|
||||||
gap: 2em;
|
gap: 2em;
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&-detail {
|
.item-detail {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 5px 35%;
|
grid-template-columns: 1fr 5px 35%;
|
||||||
justify-items: center;
|
justify-items: center;
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api"
|
|||||||
|
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
import { Card } from "../../components/card/card";
|
import { Card } from "../../components/card/card";
|
||||||
import Hero from "../../components/layouts/item/hero";
|
|
||||||
|
|
||||||
import { Blurhash } from "react-blurhash";
|
import { Blurhash } from "react-blurhash";
|
||||||
|
|
||||||
@@ -272,7 +271,7 @@ const PersonTitlePage = () => {
|
|||||||
duration: 0.25,
|
duration: 0.25,
|
||||||
ease: "easeInOut",
|
ease: "easeInOut",
|
||||||
}}
|
}}
|
||||||
className="scrollY padded-top"
|
className="scrollY padded-top item item-person"
|
||||||
>
|
>
|
||||||
<div className="item-hero flex flex-row">
|
<div className="item-hero flex flex-row">
|
||||||
<div className="item-hero-backdrop-container">
|
<div className="item-hero-backdrop-container">
|
||||||
|
|||||||
@@ -20,9 +20,9 @@
|
|||||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||||
}
|
}
|
||||||
|
|
||||||
.item {
|
.item-person.item {
|
||||||
gap: 1em;
|
gap: 1em;
|
||||||
&-hero {
|
.item-hero {
|
||||||
height: 50vh;
|
height: 50vh;
|
||||||
gap: 2em;
|
gap: 2em;
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&-detail {
|
.item-detail {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 5px 35%;
|
grid-template-columns: 1fr 5px 35%;
|
||||||
justify-items: center;
|
justify-items: center;
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ import { NavLink } from "react-router-dom";
|
|||||||
import LikeButton from "../../components/buttons/likeButton";
|
import LikeButton from "../../components/buttons/likeButton";
|
||||||
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
import MarkPlayedButton from "../../components/buttons/markPlayedButton";
|
||||||
import PlayButton from "../../components/buttons/playButton";
|
import PlayButton from "../../components/buttons/playButton";
|
||||||
|
import ShowMoreText from "../../components/showMoreText";
|
||||||
import { SeasonSelectorSkeleton } from "../../components/skeleton/seasonSelector";
|
import { SeasonSelectorSkeleton } from "../../components/skeleton/seasonSelector";
|
||||||
import TextLink from "../../components/textLink";
|
import TextLink from "../../components/textLink";
|
||||||
import { getTypeIcon } from "../../components/utils/iconsCollection";
|
import { getTypeIcon } from "../../components/utils/iconsCollection";
|
||||||
@@ -501,9 +502,10 @@ const SeriesTitlePage = () => {
|
|||||||
<Typography variant="h5" fontStyle="italic" mb={1}>
|
<Typography variant="h5" fontStyle="italic" mb={1}>
|
||||||
{item.data.Taglines[0] ?? ""}
|
{item.data.Taglines[0] ?? ""}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="subtitle1">
|
<ShowMoreText
|
||||||
{item.data.Overview ?? ""}
|
content={item.data.Overview ?? ""}
|
||||||
</Typography>
|
collapsedLines={4}
|
||||||
|
/>
|
||||||
{writers.length > 0 && (
|
{writers.length > 0 && (
|
||||||
<div className="hero-grid">
|
<div className="hero-grid">
|
||||||
<Typography
|
<Typography
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.item {
|
.item-series.item {
|
||||||
gap: 1em;
|
gap: 1em;
|
||||||
&-hero {
|
.item-hero {
|
||||||
height: 50vh;
|
height: 50vh;
|
||||||
gap: 2em;
|
gap: 2em;
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
width: 18% !important;
|
||||||
}
|
}
|
||||||
&-blurhash {
|
&-blurhash {
|
||||||
position: absolute !important;
|
position: absolute !important;
|
||||||
@@ -73,7 +74,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&-detail {
|
.item-detail {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 5px 35%;
|
grid-template-columns: 1fr 5px 35%;
|
||||||
justify-items: center;
|
justify-items: center;
|
||||||
@@ -85,10 +86,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&-cast {
|
&-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 {
|
&-title {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
background: $clr-background-dark;
|
background: black;
|
||||||
|
border:1px solid rgb(255 255 255 / 0.2) ;
|
||||||
padding: 0.35em;
|
padding: 0.35em;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
@@ -102,6 +108,7 @@
|
|||||||
display: grid;
|
display: grid;
|
||||||
gap: 1em;
|
gap: 1em;
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
}
|
}
|
||||||
&-card {
|
&-card {
|
||||||
display: grid;
|
display: grid;
|
||||||
@@ -155,21 +162,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-series {
|
|
||||||
.item-hero-image-container {
|
|
||||||
width: 18% !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);
|
|
||||||
&-grid {
|
|
||||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 1320px) {
|
@media (max-width: 1320px) {
|
||||||
.item-series .item-detail {
|
.item-series .item-detail {
|
||||||
&-cast {
|
&-cast {
|
||||||
|
|||||||
@@ -47,13 +47,13 @@ body {
|
|||||||
|
|
||||||
.app-backdrop {
|
.app-backdrop {
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
width: calc(100% + 100px);
|
width: calc(100% + 160px);
|
||||||
height: calc(100% + 100px);
|
height: calc(100% + 160px);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -50px;
|
top: -80px;
|
||||||
left: -50px;
|
left: -80px;
|
||||||
z-index: -2;
|
z-index: -2;
|
||||||
filter: blur(120px) saturate(130%) contrast(140%);
|
filter: blur(160px) saturate(130%) contrast(170%);
|
||||||
&-container {
|
&-container {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
@@ -61,7 +61,7 @@ body {
|
|||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
filter: brightness(0.4);
|
filter: brightness(0.3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ h1 {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
padding: 0 1.6em;
|
padding: 1.6em;
|
||||||
&.padded-top {
|
&.padded-top {
|
||||||
padding-top: 4.4em;
|
padding-top: 4.4em;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,3 +29,5 @@ $transition-time-fast: 150ms;
|
|||||||
|
|
||||||
$shadow-card: 0 4px 12px rgb(0 0 0 / 0.4);
|
$shadow-card: 0 4px 12px rgb(0 0 0 / 0.4);
|
||||||
$shadow-card-image: 0 2px 8px rgb(0 0 0 / 0.25);
|
$shadow-card-image: 0 2px 8px rgb(0 0 0 / 0.25);
|
||||||
|
|
||||||
|
$clr-background-card-icon: linear-gradient(45deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.2))
|
||||||
+4
-1
@@ -28,5 +28,8 @@
|
|||||||
"include": [
|
"include": [
|
||||||
"src/**/*" // *** The files TypeScript should type check ***
|
"src/**/*" // *** The files TypeScript should type check ***
|
||||||
],
|
],
|
||||||
"exclude": ["node_modules", "build"] // *** The files to not type check ***
|
"exclude": [
|
||||||
|
"node_modules",
|
||||||
|
"build"
|
||||||
|
] // *** The files to not type check ***
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user