style: Improve overall app component paddings and margins and rollback vite to 5.1.6
This commit is contained in:
27 files changed
+357
-335
No files matched your search
@@ -449,7 +449,6 @@ function AppReady() {
|
||||
{audioPlayerVisible && <AudioPlayer />}
|
||||
<ErrorBoundary FallbackComponent={ErrorNotice} key={location.key}>
|
||||
<Routes location={location}>
|
||||
<Route key={location.key}>
|
||||
<Route path="/" element={<Navigate to={initialRoute} />} />
|
||||
<Route
|
||||
path="/error"
|
||||
@@ -516,7 +515,6 @@ function AppReady() {
|
||||
<Route path="/favorite" element={<FavoritePage />} />
|
||||
<Route path="/about" element={<About />} />
|
||||
<Route path="/player" element={<VideoPlayer />} />
|
||||
</Route>
|
||||
</Routes>
|
||||
</ErrorBoundary>
|
||||
</div>
|
||||
|
||||
@@ -283,7 +283,7 @@ const PlayButton = ({
|
||||
{...buttonProps}
|
||||
>
|
||||
<div
|
||||
className="material-symbols-rounded em-4"
|
||||
className="material-symbols-rounded em-4 fill"
|
||||
style={{
|
||||
fontSize: "3em",
|
||||
}}
|
||||
@@ -300,7 +300,7 @@ const PlayButton = ({
|
||||
onClick={handleClick}
|
||||
startIcon={
|
||||
<div
|
||||
className="material-symbols-rounded"
|
||||
className="material-symbols-rounded fill"
|
||||
style={{
|
||||
fontSize: "2em",
|
||||
}}
|
||||
@@ -335,7 +335,14 @@ const PlayButton = ({
|
||||
}}
|
||||
color="white"
|
||||
/>
|
||||
{itemUserData.PlaybackPositionTicks > 0 ? "Resume" : "Play"}
|
||||
{itemUserData.PlaybackPositionTicks > 0
|
||||
? "Continue Watching"
|
||||
: item?.Type === "MusicAlbum" ||
|
||||
item?.Type === "Audio" ||
|
||||
item?.Type === "AudioBook" ||
|
||||
item?.Type === "Playlist"
|
||||
? "Play Now"
|
||||
: "Watch Now"}
|
||||
</Button>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
overflow: visible !important;
|
||||
align-items: flex-start;
|
||||
background: transparent !important;
|
||||
padding: 0.4em;
|
||||
margin-right: 1.5em;
|
||||
margin-bottom: .8em;
|
||||
&-box {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
@@ -30,6 +31,8 @@
|
||||
overflow: hidden;
|
||||
height: auto;
|
||||
z-index: 0;
|
||||
border: 1.2px solid rgb(255 255 255 / 0.05);
|
||||
|
||||
&.thumb{
|
||||
aspect-ratio: 1.777777;
|
||||
}
|
||||
@@ -85,7 +88,7 @@
|
||||
align-items: flex-end;
|
||||
justify-content: flex-end;
|
||||
padding: 0.5em;
|
||||
background: rgb(0 0 0 / 0.4);
|
||||
background: rgb(0 0 0 / 0.6);
|
||||
}
|
||||
&:hover,
|
||||
&:focus,
|
||||
@@ -161,6 +164,10 @@
|
||||
box-sizing: content-box;
|
||||
border-radius: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
&-text-container {
|
||||
display: flex !important;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import IconButton from "@mui/material/IconButton";
|
||||
import Typography from "@mui/material/Typography";
|
||||
|
||||
import "./cardScroller.module.scss";
|
||||
|
||||
export const CardScroller = ({
|
||||
children,
|
||||
displayCards,
|
||||
@@ -72,30 +73,26 @@ export const CardScroller = ({
|
||||
>
|
||||
<div className="card-scroller-heading-decoration" /> {title}
|
||||
</Typography>
|
||||
<ButtonGroup className="card-scroller-button-group">
|
||||
<IconButton
|
||||
className="card-scroller-button"
|
||||
onClick={() => carouselRef.previous()}
|
||||
>
|
||||
<div className="material-symbols-rounded">chevron_left</div>
|
||||
</IconButton>
|
||||
<IconButton
|
||||
className="card-scroller-button"
|
||||
onClick={() => carouselRef.next()}
|
||||
>
|
||||
<div className="material-symbols-rounded">chevron_right</div>
|
||||
</IconButton>
|
||||
</ButtonGroup>
|
||||
</Box>
|
||||
<Carousel
|
||||
swipeable={false}
|
||||
draggable={false}
|
||||
swipeable
|
||||
draggable
|
||||
responsive={responsive}
|
||||
arrows={false}
|
||||
arrows
|
||||
ref={(el) => setCarouselRef(el)}
|
||||
className="card-scroller"
|
||||
customTransition="all .6s"
|
||||
transitionDuration={600}
|
||||
customRightArrow={
|
||||
<IconButton className="card-scroller-button right">
|
||||
<div className="material-symbols-rounded">chevron_right</div>
|
||||
</IconButton>
|
||||
}
|
||||
customLeftArrow={
|
||||
<IconButton className="card-scroller-button left">
|
||||
<div className="material-symbols-rounded">chevron_left</div>
|
||||
</IconButton>
|
||||
}
|
||||
>
|
||||
{children}
|
||||
</Carousel>
|
||||
|
||||
@@ -6,7 +6,23 @@
|
||||
display: flex;
|
||||
}
|
||||
&-button {
|
||||
aspect-ratio: 1;
|
||||
position: absolute !important;
|
||||
height: 100%;
|
||||
font-size: 1em !important;
|
||||
width: 3.2em;
|
||||
&.right{
|
||||
border-radius: $border-radius-default 0 0 $border-radius-default !important;
|
||||
right: -3.2em;
|
||||
}
|
||||
&.left{
|
||||
border-radius: 0 $border-radius-default $border-radius-default 0 !important;
|
||||
left: -3.2em;
|
||||
}
|
||||
.material-symbols-rounded{
|
||||
font-size: 3.2em;
|
||||
--wght: 200;
|
||||
--opsz: 48;
|
||||
}
|
||||
}
|
||||
&-header-container {
|
||||
display: flex;
|
||||
@@ -27,6 +43,9 @@
|
||||
background: white;
|
||||
}
|
||||
}
|
||||
&-container .MuiButtonGroup-outlined{
|
||||
gap: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
.hidden-decoration {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.carousel {
|
||||
position: relative;
|
||||
height: 70vh;
|
||||
margin: 0.6em 1.6em 1.6em 1.6em;
|
||||
margin: 0.6em 2.8em 2.8em 2.8em;
|
||||
&-button {
|
||||
position: absolute !important;
|
||||
top: 50%;
|
||||
|
||||
@@ -95,7 +95,7 @@ const CarouselSlide = ({ item }) => {
|
||||
resolutionX={64}
|
||||
resolutionY={45}
|
||||
className="hero-carousel-background-blurhash"
|
||||
punch={1.2}
|
||||
punch={1.4}
|
||||
/>
|
||||
)}
|
||||
<img
|
||||
@@ -104,7 +104,7 @@ const CarouselSlide = ({ item }) => {
|
||||
src={
|
||||
item.ParentBackdropItemId
|
||||
? `${api.basePath}/Items/${item.ParentBackdropItemId}/Images/Backdrop?quality=80`
|
||||
: `${api.basePath}/Items/${item.Id}/Images/Backdrop?quality=80`
|
||||
: `${api.basePath}/Items/${item.Id}/Images/Backdrop?quality=80&fillHeight=1400`
|
||||
}
|
||||
style={{
|
||||
opacity: 0,
|
||||
|
||||
@@ -42,7 +42,7 @@ export const LatestMediaSection = ({ latestMediaLib }) => {
|
||||
}
|
||||
if (data.isSuccess && data.data.length >= 1) {
|
||||
return (
|
||||
<CardScroller displayCards={8} title={`Latest ${latestMediaLib[1]}`}>
|
||||
<CardScroller displayCards={7} title={`Latest ${latestMediaLib[1]}`}>
|
||||
{data.data.map((item) => {
|
||||
return (
|
||||
<Card
|
||||
|
||||
@@ -37,6 +37,7 @@ const ShowMoreText = ({ content, collapsedLines, extraProps }) => {
|
||||
WebkitBoxOrient: "vertical",
|
||||
width: "100%",
|
||||
}}
|
||||
variant="subtitle1"
|
||||
>
|
||||
{content}
|
||||
</Typography>
|
||||
|
||||
+1
-2
@@ -10,8 +10,7 @@ const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
networkMode: "always",
|
||||
staleTime: 1 * 60 * 1000, // 1 minute,
|
||||
refetchInterval: 10 * 60 * 1000, // 10 minutes,
|
||||
staleTime: 1 * 60 * 1000, // 1 minute
|
||||
},
|
||||
mutations: {
|
||||
networkMode: "always",
|
||||
|
||||
@@ -167,7 +167,7 @@ $border-radius: 20px;
|
||||
filter: brightness(0.8);
|
||||
position: absolute;
|
||||
top: -4.4em;
|
||||
left: -1.6em;
|
||||
left: -$page-margin;
|
||||
width: 100vw;
|
||||
height: calc(50vh + 4.4em);
|
||||
z-index: -1;
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
filter: brightness(0.8);
|
||||
position: absolute;
|
||||
top: -4.4em;
|
||||
left: -1.6em;
|
||||
left: -$page-margin;
|
||||
width: 100vw;
|
||||
height: calc(50vh + 4.4em);
|
||||
z-index: -1;
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
filter: brightness(0.8);
|
||||
position: absolute;
|
||||
top: -4.4em;
|
||||
left: -1.6em;
|
||||
left: -$page-margin;
|
||||
width: 100vw;
|
||||
height: calc(50vh + 4.4em);
|
||||
z-index: -1;
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
filter: brightness(0.8);
|
||||
position: absolute;
|
||||
top: -4.4em;
|
||||
left: -1.6em;
|
||||
left: -$page-margin;
|
||||
width: 100vw;
|
||||
height: calc(50vh + 4.4em);
|
||||
z-index: -1;
|
||||
|
||||
@@ -122,4 +122,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.home {
|
||||
padding: 0;
|
||||
}
|
||||
@@ -203,8 +203,9 @@ const Home = () => {
|
||||
<div
|
||||
className="padded-container"
|
||||
style={{
|
||||
padding: "1.6em",
|
||||
padding: "2.8em",
|
||||
scrollPadding: "4.4em",
|
||||
paddingTop: "1em"
|
||||
}}
|
||||
id="libraries"
|
||||
>
|
||||
|
||||
+40
-140
@@ -570,42 +570,41 @@ const ItemDetail = () => {
|
||||
<Typography variant="subtitle1" style={{ opacity: 0.8 }}>
|
||||
{item.data.Genres.join(", ")}
|
||||
</Typography>
|
||||
|
||||
<div className="item-hero-buttons-container flex flex-row">
|
||||
<div className="flex flex-row">
|
||||
<PlayButton
|
||||
itemId={item.data.Id}
|
||||
itemType={item.data.Type}
|
||||
itemUserData={item.data.UserData}
|
||||
currentVideoTrack={selectedVideoTrack}
|
||||
currentAudioTrack={selectedAudioTrack}
|
||||
currentSubTrack={selectedSubtitleTrack}
|
||||
userId={user.data.Id}
|
||||
sx={{
|
||||
background: "hsl(195.56deg 29.03% 18.24%) !important",
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-row" style={{ gap: "1em" }}>
|
||||
<TrailerButton
|
||||
trailerItem={item.data.RemoteTrailers}
|
||||
disabled={item.data.RemoteTrailers?.length === 0}
|
||||
/>
|
||||
<LikeButton
|
||||
itemName={item.data.Name}
|
||||
itemId={item.data.Id}
|
||||
queryKey={["item", id]}
|
||||
isFavorite={item.data.UserData.IsFavorite}
|
||||
userId={user.data.Id}
|
||||
/>
|
||||
<MarkPlayedButton
|
||||
itemName={item.data.Name}
|
||||
itemId={item.data.Id}
|
||||
queryKey={["item", id]}
|
||||
isPlayed={item.data.UserData.Played}
|
||||
userId={user.data.Id}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="item-hero-buttons-container flex flex-row">
|
||||
<div className="flex flex-row">
|
||||
<PlayButton
|
||||
itemId={item.data.Id}
|
||||
itemType={item.data.Type}
|
||||
itemUserData={item.data.UserData}
|
||||
currentVideoTrack={selectedVideoTrack}
|
||||
currentAudioTrack={selectedAudioTrack}
|
||||
currentSubTrack={selectedSubtitleTrack}
|
||||
userId={user.data.Id}
|
||||
sx={{
|
||||
background: "hsl(195.56deg 29.03% 18.24%) !important",
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-row" style={{ gap: "1em" }}>
|
||||
<TrailerButton
|
||||
trailerItem={item.data.RemoteTrailers}
|
||||
disabled={item.data.RemoteTrailers?.length === 0}
|
||||
/>
|
||||
<LikeButton
|
||||
itemName={item.data.Name}
|
||||
itemId={item.data.Id}
|
||||
queryKey={["item", id]}
|
||||
isFavorite={item.data.UserData.IsFavorite}
|
||||
userId={user.data.Id}
|
||||
/>
|
||||
<MarkPlayedButton
|
||||
itemName={item.data.Name}
|
||||
itemId={item.data.Id}
|
||||
queryKey={["item", id]}
|
||||
isPlayed={item.data.UserData.Played}
|
||||
userId={user.data.Id}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -635,83 +634,10 @@ const ItemDetail = () => {
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<Typography variant="h5" fontStyle="italic" mb={1}>
|
||||
{item.data.Taglines[0] ?? ""}
|
||||
</Typography>
|
||||
<ShowMoreText
|
||||
content={item.data.Overview ?? ""}
|
||||
collapsedLines={4}
|
||||
/>
|
||||
{writers.length > 0 && (
|
||||
<div className="hero-grid">
|
||||
<Typography
|
||||
variant="subtitle1"
|
||||
style={{
|
||||
opacity: 0.6,
|
||||
}}
|
||||
noWrap
|
||||
>
|
||||
Written by
|
||||
</Typography>
|
||||
<div className="hero-text-container">
|
||||
{writers.map((writer, index) => (
|
||||
<>
|
||||
<TextLink
|
||||
key={writer.Id}
|
||||
variant={"subtitle1"}
|
||||
location={`/person/${writer.Id}`}
|
||||
>
|
||||
{writer.Name}
|
||||
</TextLink>
|
||||
{index !== writers.length - 1 && (
|
||||
<span
|
||||
style={{
|
||||
whiteSpace: "pre",
|
||||
}}
|
||||
>
|
||||
,{" "}
|
||||
</span>
|
||||
)}
|
||||
</>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{directors.length > 0 && (
|
||||
<div className="hero-grid">
|
||||
<Typography
|
||||
variant="subtitle1"
|
||||
style={{
|
||||
opacity: 0.6,
|
||||
}}
|
||||
noWrap
|
||||
>
|
||||
Directed by
|
||||
</Typography>
|
||||
<div className="hero-text-container">
|
||||
{directors.map((director, index) => (
|
||||
<>
|
||||
<TextLink
|
||||
key={director.Id}
|
||||
variant={"subtitle1"}
|
||||
location={`/person/${director.Id}`}
|
||||
>
|
||||
{director.Name}
|
||||
</TextLink>
|
||||
{index !== directors.length - 1 && (
|
||||
<span
|
||||
style={{
|
||||
whiteSpace: "pre",
|
||||
}}
|
||||
>
|
||||
,{" "}
|
||||
</span>
|
||||
)}
|
||||
</>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<Divider flexItem orientation="vertical" />
|
||||
<div
|
||||
@@ -976,36 +902,10 @@ const ItemDetail = () => {
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
{/* {item.data.People.length > 0 && (
|
||||
<CardScroller
|
||||
title="Cast & Crew"
|
||||
displayCards={8}
|
||||
disableDecoration
|
||||
>
|
||||
{item.data.People.map((person) => {
|
||||
return (
|
||||
<ActorCard
|
||||
key={person.Id}
|
||||
item={person}
|
||||
cardTitle={person.Name}
|
||||
cardCaption={person.Role}
|
||||
cardType="square"
|
||||
userId={user.data.Id}
|
||||
imageBlurhash={
|
||||
person.ImageBlurHashes
|
||||
?.Primary[0]
|
||||
}
|
||||
overrideIcon="Person"
|
||||
disableOverlay
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</CardScroller>
|
||||
)} */}
|
||||
{similarItems.data.TotalRecordCount > 0 && (
|
||||
<CardScroller
|
||||
title="You might also like"
|
||||
displayCards={8}
|
||||
displayCards={7}
|
||||
disableDecoration
|
||||
>
|
||||
{similarItems.data.Items.map((similar) => {
|
||||
@@ -1024,14 +924,14 @@ const ItemDetail = () => {
|
||||
similar.Type === BaseItemKind.Episode
|
||||
? `S${similar.ParentIndexNumber}:E${similar.IndexNumber} - ${similar.Name}`
|
||||
: similar.Type === BaseItemKind.Series
|
||||
? `${similar.ProductionYear} - ${
|
||||
? `${similar.ProductionYear} - ${
|
||||
similar.EndDate
|
||||
? new Date(similar.EndDate).toLocaleString([], {
|
||||
year: "numeric",
|
||||
})
|
||||
})
|
||||
: "Present"
|
||||
}`
|
||||
: similar.ProductionYear
|
||||
}`
|
||||
: similar.ProductionYear
|
||||
}
|
||||
cardType={
|
||||
similar.Type === BaseItemKind.MusicAlbum ||
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
height: 50vh;
|
||||
gap: 2em;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
align-items: flex-end;
|
||||
margin-bottom: 5vh;
|
||||
&-image {
|
||||
opacity: 0;
|
||||
width: 100%;
|
||||
@@ -59,9 +60,9 @@
|
||||
filter: brightness(0.8);
|
||||
position: absolute;
|
||||
top: -4.4em;
|
||||
left: -1.6em;
|
||||
left: -$page-margin;
|
||||
width: 100vw;
|
||||
height: calc(50vh + 4.4em);
|
||||
height: calc(60vh + 4.4em);
|
||||
z-index: -1;
|
||||
mask-image: linear-gradient(to top, transparent, black);
|
||||
-webkit-mask-image: linear-gradient(
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
filter: brightness(0.8);
|
||||
position: absolute;
|
||||
top: -4.4em;
|
||||
left: -1.6em;
|
||||
left: -$page-margin;
|
||||
width: 100vw;
|
||||
height: calc(50vh + 4.4em);
|
||||
z-index: -1;
|
||||
|
||||
+107
-49
@@ -1038,26 +1038,55 @@ const SeriesTitlePage = () => {
|
||||
}}
|
||||
className="item-detail-episode"
|
||||
>
|
||||
<Typography variant="h6">{episode.IndexNumber ?? 0}</Typography>
|
||||
<div className="item-detail-episode-image-container">
|
||||
<Typography variant="subtitle1" textAlign="center">
|
||||
{episode.IndexNumberEnd
|
||||
? `${episode.IndexNumber} / ${episode.IndexNumberEnd}`
|
||||
: episode.IndexNumber ?? 0}
|
||||
</Typography>
|
||||
<div
|
||||
className={
|
||||
episode.UserData?.Played
|
||||
? "item-detail-episode-image-container watched"
|
||||
: "item-detail-episode-image-container"
|
||||
}
|
||||
>
|
||||
<div className="item-detail-episode-image-overlay">
|
||||
<PlayButton item={episode} itemId={episode.Id} itemType="Episode" itemUserData={episode.UserData} userId={user.data.Id} currentAudioTrack={0} currentVideoTrack={0} currentSubTrack={0} size="medium" buttonProps={{
|
||||
color: "white",
|
||||
style: {
|
||||
color: "black ",
|
||||
},
|
||||
}} iconOnly />
|
||||
<PlayButton
|
||||
item={episode}
|
||||
itemId={episode.Id}
|
||||
itemType="Episode"
|
||||
itemUserData={episode.UserData}
|
||||
userId={user.data.Id}
|
||||
currentAudioTrack={0}
|
||||
currentVideoTrack={0}
|
||||
currentSubTrack={0}
|
||||
size="medium"
|
||||
buttonProps={{
|
||||
color: "white",
|
||||
style: {
|
||||
color: "black ",
|
||||
},
|
||||
}}
|
||||
iconOnly
|
||||
/>
|
||||
</div>
|
||||
<div className="item-detail-episode-image-icon-container">
|
||||
<span className="material-symbols-rounded item-detail-episode-image-icon">tv_gen</span>
|
||||
<span className="material-symbols-rounded item-detail-episode-image-icon">
|
||||
tv_gen
|
||||
</span>
|
||||
</div>
|
||||
<img alt={episode.Name} src={api.getItemImageUrl(episode.Id, "Primary", {
|
||||
tag: episode.ImageTags.Primary,
|
||||
fillHeight: 300,
|
||||
})} className="item-detail-episode-image" onLoad={(e) => {
|
||||
e.target.style.opacity = 1;
|
||||
}} />
|
||||
{episode.UserData?.PlaybackPositionTicks > 0 &&
|
||||
<img
|
||||
alt={episode.Name}
|
||||
src={api.getItemImageUrl(episode.Id, "Primary", {
|
||||
tag: episode.ImageTags.Primary,
|
||||
fillHeight: 300,
|
||||
})}
|
||||
className="item-detail-episode-image"
|
||||
onLoad={(e) => {
|
||||
e.target.style.opacity = 1;
|
||||
}}
|
||||
/>
|
||||
{episode.UserData?.PlaybackPositionTicks > 0 && (
|
||||
<div className="card-progress-container">
|
||||
<div
|
||||
className="card-progress"
|
||||
@@ -1066,44 +1095,73 @@ const SeriesTitlePage = () => {
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
)}
|
||||
</div>
|
||||
<div className="item-detail-episode-info">
|
||||
<Typography variant="h6">{episode.Name}</Typography>
|
||||
<div className="flex flex-row flex-align-center" style={{
|
||||
gap: "0.5em",
|
||||
}}>
|
||||
{episode.PremiereDate && <Chip variant="filled" label={getEpisodeDateString(new Date(episode.PremiereDate))} size="small" />}
|
||||
<Typography variant="subtitle1" >{getRuntimeCompact(episode.RunTimeTicks)}</Typography>
|
||||
</div>
|
||||
<Typography style={{
|
||||
display: "-webkit-box",
|
||||
textOverflow: "ellipsis",
|
||||
overflow: "hidden",
|
||||
WebkitLineClamp: 2,
|
||||
WebkitBoxOrient: "vertical",
|
||||
width: "100%",
|
||||
opacity: 0.7
|
||||
}}>{episode.Overview}</Typography>
|
||||
<div className="item-detail-episode-info-buttons">
|
||||
<LikeButton
|
||||
itemId={episode.Id}
|
||||
itemName={episode.Name}
|
||||
isFavorite={episode.UserData?.IsFavorite}
|
||||
queryKey={["item", id, `season ${currentSeason + 1}`, "episodes"]}
|
||||
userId={user.data.Id}
|
||||
/>
|
||||
<MarkPlayedButton
|
||||
itemId={episode.Id}
|
||||
itemName={episode.Name}
|
||||
isPlayed={episode.UserData?.Played}
|
||||
queryKey={["item", id, `season ${currentSeason + 1}`, "episodes"]}
|
||||
userId={user.data.Id}
|
||||
/>
|
||||
<Typography variant="subtitle1">
|
||||
{episode.Name}
|
||||
</Typography>
|
||||
<div
|
||||
className="flex flex-row flex-align-center"
|
||||
style={{
|
||||
gap: "0.5em",
|
||||
}}
|
||||
>
|
||||
{episode.PremiereDate && (
|
||||
<Chip
|
||||
variant="filled"
|
||||
label={getEpisodeDateString(
|
||||
new Date(episode.PremiereDate),
|
||||
)}
|
||||
size="small"
|
||||
/>
|
||||
)}
|
||||
<Typography variant="caption">
|
||||
{getRuntimeCompact(episode.RunTimeTicks)}
|
||||
</Typography>
|
||||
</div>
|
||||
<Typography
|
||||
variant="caption"
|
||||
style={{
|
||||
display: "-webkit-box",
|
||||
textOverflow: "ellipsis",
|
||||
overflow: "hidden",
|
||||
WebkitLineClamp: 2,
|
||||
WebkitBoxOrient: "vertical",
|
||||
width: "100%",
|
||||
opacity: 0.7,
|
||||
}}
|
||||
>
|
||||
{episode.Overview}
|
||||
</Typography>
|
||||
</div>
|
||||
<div className="item-detail-episode-buttons">
|
||||
<LikeButton
|
||||
itemId={episode.Id}
|
||||
itemName={episode.Name}
|
||||
isFavorite={episode.UserData?.IsFavorite}
|
||||
queryKey={[
|
||||
"item",
|
||||
id,
|
||||
`season ${currentSeason + 1}`,
|
||||
"episodes",
|
||||
]}
|
||||
userId={user.data.Id}
|
||||
/>
|
||||
<MarkPlayedButton
|
||||
itemId={episode.Id}
|
||||
itemName={episode.Name}
|
||||
isPlayed={episode.UserData?.Played}
|
||||
queryKey={[
|
||||
"item",
|
||||
id,
|
||||
`season ${currentSeason + 1}`,
|
||||
"episodes",
|
||||
]}
|
||||
userId={user.data.Id}
|
||||
/>
|
||||
</div>
|
||||
</motion.div>
|
||||
{index + 1 !== episodes.data?.Items?.length && <Divider orientation="horizontal" flexItem />}
|
||||
</>
|
||||
);
|
||||
})}
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
filter: brightness(0.8);
|
||||
position: absolute;
|
||||
top: -4.4em;
|
||||
left: -1.6em;
|
||||
left: -$page-margin;
|
||||
width: 100vw;
|
||||
height: calc(50vh + 4.4em);
|
||||
z-index: -1;
|
||||
@@ -153,14 +153,15 @@
|
||||
}
|
||||
&-episode{
|
||||
display:grid;
|
||||
grid-template-columns: 1.4em 16em 1fr;
|
||||
grid-template-columns: 3.2em 12em 1fr 6em;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
gap:1em;
|
||||
gap:1.8em;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
|
||||
padding: 1em 0;
|
||||
|
||||
&-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -182,12 +183,26 @@
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
&-container{
|
||||
width: 16em;
|
||||
width: 100%;
|
||||
aspect-ratio: 1.66666;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border-radius: $border-radius-default;
|
||||
flex-shrink: 0;
|
||||
&::after{
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
border: 0.85em solid #00c853;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent;
|
||||
opacity: 0;
|
||||
transition: opacity $transition-time-default;
|
||||
}
|
||||
&.watched::after {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
&-overlay{
|
||||
position: absolute;
|
||||
@@ -223,7 +238,11 @@
|
||||
width: 100%;
|
||||
padding-right: 2em;
|
||||
}
|
||||
|
||||
&-buttons{
|
||||
display: flex;
|
||||
gap: 1em;
|
||||
}
|
||||
|
||||
&:hover .item-detail-episode-image-overlay, &:focus-within .item-detail-episode-image-overlay{
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
+20
-8
@@ -53,7 +53,7 @@ body {
|
||||
top: -80px;
|
||||
left: -80px;
|
||||
z-index: -2;
|
||||
filter: blur(160px) saturate(130%) contrast(170%);
|
||||
filter: blur(160px) saturate(140%) contrast(200%);
|
||||
&-container {
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
@@ -61,7 +61,7 @@ body {
|
||||
left: 0;
|
||||
top: 0;
|
||||
z-index: -1;
|
||||
filter: brightness(0.3);
|
||||
filter: brightness(0.5);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,17 +126,13 @@ h1 {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
min-height: 100vh;
|
||||
padding: 1.6em;
|
||||
padding: $page-margin;
|
||||
scrollbar-gutter: stable;
|
||||
&.padded-top {
|
||||
padding-top: 4.4em;
|
||||
}
|
||||
}
|
||||
|
||||
.home {
|
||||
padding-left: 0 !important;
|
||||
padding-right: 14px !important;
|
||||
}
|
||||
|
||||
.empty {
|
||||
display: none;
|
||||
}
|
||||
@@ -272,4 +268,20 @@ h1 {
|
||||
aspect-ratio: 1;
|
||||
border-radius: 10px;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.react-multi-carousel-list{
|
||||
overflow: visible !important;
|
||||
}
|
||||
|
||||
.react-multi-carousel-item{
|
||||
filter: brightness(0.4);
|
||||
transition: filter 500ms;
|
||||
&.react-multi-carousel-item--active{
|
||||
filter: brightness(1);
|
||||
}
|
||||
}
|
||||
|
||||
@function neg($var) {
|
||||
@return $var * -1;
|
||||
}
|
||||
@@ -21,7 +21,7 @@ $clr-gradient-dark: linear-gradient(
|
||||
$clr-secondary-dark
|
||||
);
|
||||
|
||||
$border-radius-default: 10px;
|
||||
$border-radius-default: 6px;
|
||||
$border-radius_04: 4px;
|
||||
|
||||
$transition-time-default: 250ms;
|
||||
@@ -30,4 +30,6 @@ $transition-time-fast: 150ms;
|
||||
$shadow-card: 0 4px 12px rgb(0 0 0 / 0.4);
|
||||
$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))
|
||||
$clr-background-card-icon: linear-gradient(45deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.2));
|
||||
|
||||
$page-margin: 3.2em;
|
||||
Reference in new issue
Block a user