Update Carousel, Remove logo from appbar, update error icon
This commit is contained in:
7 files changed
+40
-74
No files matched your search
@@ -41,7 +41,7 @@ import { useApi } from "../../utils/store/api";
|
|||||||
|
|
||||||
import { getTypeIcon } from "../../components/utils/iconsCollection";
|
import { getTypeIcon } from "../../components/utils/iconsCollection";
|
||||||
|
|
||||||
import logo from "../../assets/logo.svg";
|
import logo from "../../assets/icon.svg";
|
||||||
|
|
||||||
export const AppBar = () => {
|
export const AppBar = () => {
|
||||||
const [api] = useApi((state) => [state.api]);
|
const [api] = useApi((state) => [state.api]);
|
||||||
@@ -172,26 +172,17 @@ export const AppBar = () => {
|
|||||||
gridTemplateColumns: "30% 1fr 30%",
|
gridTemplateColumns: "30% 1fr 30%",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<IconButton
|
||||||
className="flex flex-row flex-center"
|
onClick={() => navigate(-1)}
|
||||||
|
disabled={!backButtonVisible}
|
||||||
style={{
|
style={{
|
||||||
gap: "1.2em",
|
justifySelf: "left",
|
||||||
justifySelf: "start",
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<IconButton
|
<div className="material-symbols-rounded">
|
||||||
onClick={() => navigate(-1)}
|
arrow_back
|
||||||
disabled={!backButtonVisible}
|
</div>
|
||||||
style={{
|
</IconButton>
|
||||||
justifySelf: "left",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div className="material-symbols-rounded">
|
|
||||||
arrow_back
|
|
||||||
</div>
|
|
||||||
</IconButton>
|
|
||||||
<img src={logo} className="appBar-logo" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className="flex flex-row flex-center"
|
className="flex flex-row flex-center"
|
||||||
|
|||||||
@@ -14,9 +14,6 @@
|
|||||||
fill: url(#clr-gradient-default) !important;
|
fill: url(#clr-gradient-default) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&-logo {
|
|
||||||
height: 1.8em !important;
|
|
||||||
}
|
|
||||||
&-text {
|
&-text {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
@@ -55,11 +52,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&-logo {
|
|
||||||
width: 20em;
|
|
||||||
object-fit: contain;
|
|
||||||
object-position: center;
|
|
||||||
}
|
|
||||||
&-library {
|
&-library {
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
&.active {
|
&.active {
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ const Carousel = ({ content, onChange }) => {
|
|||||||
>
|
>
|
||||||
<div className="material-symbols-rounded">arrow_left</div>
|
<div className="material-symbols-rounded">arrow_left</div>
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<AnimatePresence>
|
<AnimatePresence mode="sync">
|
||||||
<motion.div
|
<motion.div
|
||||||
key={currentSlide}
|
key={currentSlide}
|
||||||
initial={{ opacity: 0 }}
|
initial={{ opacity: 0 }}
|
||||||
@@ -54,6 +54,7 @@ const Carousel = ({ content, onChange }) => {
|
|||||||
exit={{ opacity: 0 }}
|
exit={{ opacity: 0 }}
|
||||||
transition={{
|
transition={{
|
||||||
duration: 0.25,
|
duration: 0.25,
|
||||||
|
ease: "linear",
|
||||||
}}
|
}}
|
||||||
drag={"x"}
|
drag={"x"}
|
||||||
dragConstraints={{ left: 0, right: 0 }}
|
dragConstraints={{ left: 0, right: 0 }}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import { useNavigate } from "react-router-dom";
|
|||||||
import { MediaTypeIconCollection, getTypeIcon } from "../utils/iconsCollection";
|
import { MediaTypeIconCollection, getTypeIcon } from "../utils/iconsCollection";
|
||||||
import { MdiChevronRight } from "../icons/mdiChevronRight";
|
import { MdiChevronRight } from "../icons/mdiChevronRight";
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
import { red } from "@mui/material/colors";
|
import { red, green } from "@mui/material/colors";
|
||||||
|
|
||||||
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||||
import LikeButton from "../buttons/likeButton";
|
import LikeButton from "../buttons/likeButton";
|
||||||
@@ -98,20 +98,20 @@ const CarouselSlide = ({ item }) => {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
// hash="LEHV6nWB2yk8pyo0adR*.7kCMdnj"
|
// hash="LEHV6nWB2yk8pyo0adR*.7kCMdnj"
|
||||||
width="108"
|
width="256"
|
||||||
height="72"
|
height="179.2"
|
||||||
resolutionX={64}
|
resolutionX={64}
|
||||||
resolutionY={96}
|
resolutionY={45}
|
||||||
className="hero-carousel-background-blurhash"
|
className="hero-carousel-background-blurhash"
|
||||||
punch={1}
|
punch={1.2}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<img
|
<img
|
||||||
className="hero-carousel-background-image"
|
className="hero-carousel-background-image"
|
||||||
src={
|
src={
|
||||||
item.ParentBackdropItemId
|
item.ParentBackdropItemId
|
||||||
? `${api.basePath}/Items/${item.ParentBackdropItemId}/Images/Backdrop`
|
? `${api.basePath}/Items/${item.ParentBackdropItemId}/Images/Backdrop?quality=80`
|
||||||
: `${api.basePath}/Items/${item.Id}/Images/Backdrop`
|
: `${api.basePath}/Items/${item.Id}/Images/Backdrop?quality=80`
|
||||||
}
|
}
|
||||||
style={{
|
style={{
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
@@ -127,32 +127,7 @@ const CarouselSlide = ({ item }) => {
|
|||||||
{getTypeIcon(item.Type)}
|
{getTypeIcon(item.Type)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<motion.div
|
<div className="hero-carousel-detail">
|
||||||
// initial={{
|
|
||||||
// transform:
|
|
||||||
// animationDirection == "right"
|
|
||||||
// ? "translateX(60px)"
|
|
||||||
// : "translateX(-60px)",
|
|
||||||
// opacity: 0,
|
|
||||||
// }}
|
|
||||||
// animate={{
|
|
||||||
// transform: "translateX(0px)",
|
|
||||||
// opacity: 1,
|
|
||||||
// }}
|
|
||||||
// exit={{
|
|
||||||
// transform:
|
|
||||||
// animationDirection == "right"
|
|
||||||
// ? "translateX(-60px)"
|
|
||||||
// : "translateX(60px)",
|
|
||||||
|
|
||||||
// opacity: 0,
|
|
||||||
// }}
|
|
||||||
// transition={{
|
|
||||||
// duration: 0.25,
|
|
||||||
// ease: "easeInOut",
|
|
||||||
// }}
|
|
||||||
className="hero-carousel-detail"
|
|
||||||
>
|
|
||||||
<Typography
|
<Typography
|
||||||
component={motion.div}
|
component={motion.div}
|
||||||
initial={{
|
initial={{
|
||||||
@@ -253,7 +228,8 @@ const CarouselSlide = ({ item }) => {
|
|||||||
variant="filled"
|
variant="filled"
|
||||||
label={item.OfficialRating ?? "Not Rated"}
|
label={item.OfficialRating ?? "Not Rated"}
|
||||||
/>
|
/>
|
||||||
<ErrorBoundary fallback={<></>}>
|
|
||||||
|
{item.CommunityRating && (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
@@ -284,7 +260,7 @@ const CarouselSlide = ({ item }) => {
|
|||||||
) / 10}
|
) / 10}
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
</ErrorBoundary>
|
)}
|
||||||
{Boolean(item.CriticRating) && (
|
{Boolean(item.CriticRating) && (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
@@ -297,12 +273,17 @@ const CarouselSlide = ({ item }) => {
|
|||||||
<div
|
<div
|
||||||
className="material-symbols-rounded "
|
className="material-symbols-rounded "
|
||||||
style={{
|
style={{
|
||||||
color: red[400],
|
color:
|
||||||
|
item.CriticRating > 50
|
||||||
|
? green[400]
|
||||||
|
: red[400],
|
||||||
fontVariationSettings:
|
fontVariationSettings:
|
||||||
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
|
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
thumb_up
|
{item.CriticRating > 50
|
||||||
|
? "thumb_up"
|
||||||
|
: "thumb_down"}
|
||||||
</div>
|
</div>
|
||||||
<Typography
|
<Typography
|
||||||
style={{
|
style={{
|
||||||
@@ -438,7 +419,7 @@ const CarouselSlide = ({ item }) => {
|
|||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
</motion.div>
|
</div>
|
||||||
</Paper>
|
</Paper>
|
||||||
</ErrorBoundary>
|
</ErrorBoundary>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -26,12 +26,12 @@ export const ErrorNotice = ({ error, resetErrorBoundary }) => {
|
|||||||
color: red[800],
|
color: red[800],
|
||||||
"--clr": "rgb(198 40 40 / 30%)",
|
"--clr": "rgb(198 40 40 / 30%)",
|
||||||
fontVariationSettings:
|
fontVariationSettings:
|
||||||
'"FILL" 0, "wght" 100, "GRAD" 25, "opsz" 40',
|
'"FILL" 1, "wght" 400, "GRAD" 25, "opsz" 60',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
error
|
error
|
||||||
</div>
|
</div>
|
||||||
<Typography variant="h3" fontWeight={100}>
|
<Typography variant="h3" fontWeight={300}>
|
||||||
Something went wrong
|
Something went wrong
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography
|
||||||
|
|||||||
@@ -28,26 +28,25 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
filter: brightness(0.7);
|
filter: brightness(0.8);
|
||||||
}
|
}
|
||||||
&-image {
|
&-image {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
width: 100%;
|
width: 80%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
transition: opacity 0.5s;
|
transition: opacity 0.5s;
|
||||||
mask-image: linear-gradient(to bottom, black 10%, transparent);
|
mask-image: linear-gradient(to left, black 50%, transparent);
|
||||||
-webkit-mask-image: linear-gradient(
|
-webkit-mask-image: linear-gradient(
|
||||||
to left,
|
to left,
|
||||||
black 40%,
|
black 50%,
|
||||||
transparent 90%
|
transparent
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -501,7 +501,9 @@ const SearchPage = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<EmptyNotice
|
<EmptyNotice
|
||||||
extraMsg={"Try using different terms."}
|
extraMsg={
|
||||||
|
"Try using different search terms."
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in new issue
Block a user