style: Improve overall app component paddings and margins and rollback vite to 5.1.6

This commit is contained in:
Prayag Prajapati committed 2024-03-25 11:30:45 +05:30
1 parent 1f724f027c
commit 08e633524a
27 files changed
+357 -335

No files matched your search

+10 -3
View File
@@ -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>
);
};
+9 -2
View File
@@ -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;
}
}
+14 -17
View File
@@ -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 {
+1 -1
View File
@@ -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%;
+2 -2
View File
@@ -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
+1
View File
@@ -37,6 +37,7 @@ const ShowMoreText = ({ content, collapsedLines, extraProps }) => {
WebkitBoxOrient: "vertical",
width: "100%",
}}
variant="subtitle1"
>
{content}
</Typography>