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