Update icons

This commit is contained in:
Prayag Prajapati committed 2023-11-21 15:18:37 +05:30
1 parent e28917f8d3
commit bc3ddc3f24
8 files changed
+162 -124

No files matched your search

+1 -1
View File
@@ -476,7 +476,7 @@ function App() {
</Route> </Route>
</Routes> </Routes>
</div> </div>
<ReactQueryDevtools /> <ReactQueryDevtools buttonPosition="bottom-left" />
</ThemeProvider> </ThemeProvider>
</SnackbarProvider> </SnackbarProvider>
); );
+7 -33
View File
@@ -123,6 +123,7 @@ export const AppBar = () => {
style={{ style={{
backgroundColor: "transparent", backgroundColor: "transparent",
paddingRight: "0 !important", paddingRight: "0 !important",
width: "fit-content",
}} }}
className={trigger ? "appBar backdropVisible" : "appBar"} className={trigger ? "appBar backdropVisible" : "appBar"}
elevation={0} elevation={0}
@@ -130,42 +131,20 @@ export const AppBar = () => {
<Toolbar <Toolbar
sx={{ sx={{
justifyContent: "space-between", justifyContent: "space-between",
paddingLeft: "20px !important", padding: "13px !important",
}}
>
<div
style={{
display: "flex", display: "flex",
gap: "1em", gap: "1.2em",
alignItems: "center",
}} }}
> >
<IconButton
color="inherit"
aria-label="open drawer"
onClick={handleDrawerOpen}
>
<div className="material-symbols-rounded">
menu
</div>
</IconButton>
<IconButton <IconButton
onClick={() => navigate(-1)} onClick={() => navigate(-1)}
sx={{ disabled={!backButtonVisible}
transition: "transform 0.2s",
transform: backButtonVisible
? "scale(1)"
: "scale(0)",
transformOrigin: "left",
ml: 2,
}}
> >
<div className="material-symbols-rounded"> <div className="material-symbols-rounded">
arrow_back arrow_back
</div> </div>
</IconButton> </IconButton>
</div>
<div style={{ display: "flex", gap: "1.2em" }}>
<IconButton onClick={() => navigate("/search")}> <IconButton onClick={() => navigate("/search")}>
<div className="material-symbols-rounded"> <div className="material-symbols-rounded">
search search
@@ -176,13 +155,9 @@ export const AppBar = () => {
favorite favorite
</div> </div>
</IconButton> </IconButton>
<IconButton <IconButton sx={{ p: 0 }} onClick={handleMenuOpen}>
sx={{ p: 0 }}
onClick={handleMenuOpen}
>
{user.isSuccess && {user.isSuccess &&
(user.data.PrimaryImageTag == (user.data.PrimaryImageTag == undefined ? (
undefined ? (
<Avatar <Avatar
className="appBar-avatar" className="appBar-avatar"
alt={user.data.Name} alt={user.data.Name}
@@ -256,7 +231,6 @@ export const AppBar = () => {
Remove Server Remove Server
</MenuItem> </MenuItem>
</Menu> </Menu>
</div>
</Toolbar> </Toolbar>
</MuiAppBar> </MuiAppBar>
); );
+5 -2
View File
@@ -1,12 +1,15 @@
/** @format */ /** @format */
.appBar { .appBar {
top: 8px !important;
right: 8px !important;
border-radius: 10000px;
transition: background-color $transition-time-fast, transition: background-color $transition-time-fast,
backdrop-filter $transition-time-fast, backdrop-filter $transition-time-fast,
box-shadow $transition-time-default !important; box-shadow $transition-time-default !important;
&.backdropVisible { &.backdropVisible {
background-color: $clr-background-dark-opacity-0_8 !important; background-color: rgb(0 0 0 / 0.6) !important;
backdrop-filter: blur(30px); backdrop-filter: blur(10px);
} }
&-avatar { &-avatar {
background: $clr-gradient-dark; background: $clr-gradient-dark;
+2 -2
View File
@@ -40,7 +40,7 @@ const Carousel = ({ content, onChange }) => {
}} }}
disabled={currentSlide == 0} disabled={currentSlide == 0}
> >
<MdiChevronLeft /> <div className="material-symbols-rounded">arrow_left</div>
</IconButton> </IconButton>
<AnimatePresence> <AnimatePresence>
<motion.div <motion.div
@@ -93,7 +93,7 @@ const Carousel = ({ content, onChange }) => {
background: " rgb(200 200 200 / 0.05)", background: " rgb(200 200 200 / 0.05)",
}} }}
> >
<MdiChevronRight /> <div className="material-symbols-rounded">arrow_right</div>
</IconButton> </IconButton>
<div className="carousel-indicator-container"> <div className="carousel-indicator-container">
{content.map((item, index) => ( {content.map((item, index) => (
+72 -46
View File
@@ -113,6 +113,10 @@ export const SideMenu = () => {
state.setOpen, state.setOpen,
]); ]);
const handleDrawerOpen = () => {
setDrawerOpen(true);
};
if (!display) { if (!display) {
return <></>; return <></>;
} }
@@ -143,7 +147,17 @@ export const SideMenu = () => {
sx={{ sx={{
justifyContent: "center", justifyContent: "center",
}} }}
></DrawerHeader> >
<IconButton
color="inherit"
aria-label="open drawer"
onClick={handleDrawerOpen}
>
<div className="material-symbols-rounded">
menu
</div>
</IconButton>
</DrawerHeader>
<div className="sidemenu-item-container"> <div className="sidemenu-item-container">
{libraries.isPending ? ( {libraries.isPending ? (
<></> <></>
@@ -236,10 +250,13 @@ export const SideMenu = () => {
}} }}
> >
<IconButton onClick={() => setDrawerOpen(false)}> <IconButton onClick={() => setDrawerOpen(false)}>
<MdiClose /> <div className="material-symbols-rounded">
close
</div>
</IconButton> </IconButton>
</DrawerHeader> </DrawerHeader>
<Divider /> <Divider />
{libraries.isPending ? ( {libraries.isPending ? (
<> <>
<Skeleton <Skeleton
@@ -252,6 +269,50 @@ export const SideMenu = () => {
) : ( ) : (
<> <>
<List sx={{ border: "none" }}> <List sx={{ border: "none" }}>
<Tooltip
title="Home"
placement="right"
followCursor
arrow
>
<ListItem
className="sidemenu-item-container"
disablePadding
sx={{
mt: "0em !important",
}}
>
<ListItemButton
component={NavLink}
to={"home"}
className="sidemenu-item"
sx={{
minHeight: 48,
justifyContent:
"center",
px: 2.5,
flexDirection:
"row",
}}
>
<ListItemIcon
sx={{
minWidth: 0,
justifyContent:
"center",
mr: 2,
}}
>
<div className="material-symbols-rounded">
home
</div>
</ListItemIcon>
<ListItemText>
Home
</ListItemText>
</ListItemButton>
</ListItem>
</Tooltip>
{libraries.data.Items.map( {libraries.data.Items.map(
(library, index) => { (library, index) => {
return ( return (
@@ -265,6 +326,9 @@ export const SideMenu = () => {
<ListItem <ListItem
className="sidemenu-item-container" className="sidemenu-item-container"
disablePadding disablePadding
sx={{
mt: "0em !important",
}}
> >
<ListItemButton <ListItemButton
component={ component={
@@ -292,12 +356,9 @@ export const SideMenu = () => {
mr: 2, mr: 2,
}} }}
> >
{ {getTypeIcon(
MediaCollectionTypeIconCollection[ library.CollectionType,
library )}
.CollectionType
]
}
</ListItemIcon> </ListItemIcon>
<ListItemText> <ListItemText>
{ {
@@ -313,43 +374,6 @@ export const SideMenu = () => {
</List> </List>
<List sx={{ marginTop: "auto" }}> <List sx={{ marginTop: "auto" }}>
<Divider /> <Divider />
<Tooltip
title="Home"
placement="right"
followCursor
arrow
>
<ListItem
className="sidemenu-item-container"
disablePadding
>
<ListItemButton
component={NavLink}
to="/home"
className="sidemenu-item"
sx={{
minHeight: 48,
justifyContent:
"center",
px: 2.5,
}}
>
<ListItemIcon
sx={{
minWidth: 0,
justifyContent:
"center",
mr: 2,
}}
>
<MdiHomeVariantOutline />
</ListItemIcon>
<ListItemText>
Home
</ListItemText>
</ListItemButton>
</ListItem>
</Tooltip>
<Tooltip <Tooltip
title="Logout" title="Logout"
placement="right" placement="right"
@@ -374,7 +398,9 @@ export const SideMenu = () => {
mr: 2, mr: 2,
}} }}
> >
<MdiLogoutVariant></MdiLogoutVariant> <div className="material-symbols-rounded">
logout
</div>
</ListItemIcon> </ListItemIcon>
<ListItemText> <ListItemText>
Logout Logout
+2 -5
View File
@@ -35,8 +35,6 @@
transform: scaleX(1); transform: scaleX(1);
} }
.sidemenu-item-text { .sidemenu-item-text {
max-height: 1.6em;
// transform: scaleY(1);
opacity: 1; opacity: 1;
} }
.material-symbols-rounded { .material-symbols-rounded {
@@ -46,11 +44,10 @@
} }
&-text { &-text {
// transform: scaleY(0);
transform-origin: top;
transition: max-height 0.5s; transition: max-height 0.5s;
max-height: 0;
transition-delay: 0.05s; transition-delay: 0.05s;
font-size: 0.7em !important;
} }
&-icon { &-icon {
+25 -14
View File
@@ -286,7 +286,9 @@ const AudioPlayer = () => {
onClick={handlePrevious} onClick={handlePrevious}
disabled={currentTrack == 0} disabled={currentTrack == 0}
> >
<MdiSkipPrevious /> <div className="material-symbols-rounded">
skip_previous
</div>
</IconButton> </IconButton>
<div <div
style={{ style={{
@@ -309,11 +311,16 @@ const AudioPlayer = () => {
size="small" size="small"
onClick={handlePlayPause} onClick={handlePlayPause}
> >
{playing ? ( <div
<MdiPause /> className="material-symbols-rounded"
) : ( style={{
<MdiPlay /> fontSize: "2em",
)} }}
>
{playing
? "pause"
: "play_arrow"}
</div>
</Fab> </Fab>
</div> </div>
<IconButton <IconButton
@@ -322,7 +329,9 @@ const AudioPlayer = () => {
tracks.length - 1 == currentTrack tracks.length - 1 == currentTrack
} }
> >
<MdiSkipNext /> <div className="material-symbols-rounded">
skip_next
</div>
</IconButton> </IconButton>
</div> </div>
<div <div
@@ -398,18 +407,18 @@ const AudioPlayer = () => {
</Paper> </Paper>
</Popper> </Popper>
<IconButton onClick={handleOpenQueue} disabled> <IconButton onClick={handleOpenQueue} disabled>
<MdiPlaylistMusicOutline /> <div className="material-symbols-rounded">
queue_music
</div>
</IconButton> </IconButton>
<IconButton <IconButton
onClick={(e) => { onClick={(e) => {
setIsMuted(!isMuted); setIsMuted(!isMuted);
}} }}
> >
{isMuted ? ( <div className="material-symbols-rounded">
<MdiVolumeOff /> {isMuted ? "volume_mute" : "volume_up"}
) : ( </div>
<MdiVolumeHigh />
)}
</IconButton> </IconButton>
<Slider <Slider
value={isMuted ? 0 : volume * 100} value={isMuted ? 0 : volume * 100}
@@ -453,7 +462,9 @@ const AudioPlayer = () => {
}} }}
/> />
<IconButton onClick={resetPlayer}> <IconButton onClick={resetPlayer}>
<MdiClose /> <div className="material-symbols-rounded">
close
</div>
</IconButton> </IconButton>
</div> </div>
</motion.div> </motion.div>
+48 -21
View File
@@ -596,7 +596,12 @@ export const VideoPlayer = () => {
gap: "2em", gap: "2em",
}} }}
> >
<MdiVolumeHigh style={{ fontSize: "3em" }} /> <div
className="material-symbols-rounded"
style={{ fontSize: "2.8em" }}
>
{isMuted ? "volume_mute" : "volume_up"}
</div>
<LinearProgress <LinearProgress
variant="determinate" variant="determinate"
value={volume * 100} value={volume * 100}
@@ -739,7 +744,9 @@ export const VideoPlayer = () => {
: true : true
} }
> >
<MdiSkipPrevious /> <div className="material-symbols-rounded">
skip_previous
</div>
</IconButton> </IconButton>
<IconButton <IconButton
onClick={() => onClick={() =>
@@ -749,12 +756,20 @@ export const VideoPlayer = () => {
) )
} }
> >
<MdiRewind /> <div className="material-symbols-rounded">
fast_rewind
</div>
</IconButton> </IconButton>
<IconButton <IconButton
onClick={() => setIsPlaying(!isPlaying)} onClick={() =>
setIsPlaying((state) => !state)
}
> >
{isPlaying ? <MdiPause /> : <MdiPlay />} <div className="material-symbols-rounded">
{isPlaying
? "pause"
: "play_arrow"}
</div>
</IconButton> </IconButton>
<IconButton <IconButton
onClick={() => onClick={() =>
@@ -764,7 +779,9 @@ export const VideoPlayer = () => {
) )
} }
> >
<MdiFastForward /> <div className="material-symbols-rounded">
fast_forward
</div>
</IconButton> </IconButton>
<IconButton <IconButton
onClick={handlePlayNextEpisode} onClick={handlePlayNextEpisode}
@@ -778,7 +795,9 @@ export const VideoPlayer = () => {
: true : true
} }
> >
<MdiSkipNext /> <div className="material-symbols-rounded">
skip_next
</div>
</IconButton> </IconButton>
<Typography variant="subtitle1"> <Typography variant="subtitle1">
{endsAt(itemDuration - currentTime)} {endsAt(itemDuration - currentTime)}
@@ -848,20 +867,24 @@ export const VideoPlayer = () => {
) )
} }
> >
<MdiPlaySpeed /> <div className="material-symbols-rounded">
pace
</div>
</IconButton> </IconButton>
</Box> </Box>
<IconButton <IconButton
sx={{ sx={{
ml: 0.1, ml: 0.1,
}} }}
onClick={() => setIsMuted(!isMuted)} onClick={() =>
setIsMuted((state) => !state)
}
> >
{isMuted ? ( <div className="material-symbols-rounded">
<MdiVolumeOff /> {isMuted
) : ( ? "volume_mute"
<MdiVolumeHigh /> : "volume_up"}
)} </div>
</IconButton> </IconButton>
<Slider <Slider
value={isMuted ? 0 : volume * 100} value={isMuted ? 0 : volume * 100}
@@ -930,7 +953,9 @@ export const VideoPlayer = () => {
} }
disabled disabled
> >
<MdiCog /> <div className="material-symbols-rounded">
settings
</div>
</IconButton> </IconButton>
</Box> </Box>
<IconButton <IconButton
@@ -938,7 +963,9 @@ export const VideoPlayer = () => {
setIsPIP(!isPIP); setIsPIP(!isPIP);
}} }}
> >
<MdiPictureInPictureBottomRight /> <div className="material-symbols-rounded">
picture_in_picture_alt
</div>
</IconButton> </IconButton>
<IconButton <IconButton
onClick={async () => { onClick={async () => {
@@ -947,11 +974,11 @@ export const VideoPlayer = () => {
setAppFullScreen(!fstate); setAppFullScreen(!fstate);
}} }}
> >
{appFullscreen ? ( <div className="material-symbols-rounded">
<MdiFullscreenExit /> {appFullscreen
) : ( ? "fullscreen_exit"
<MdiFullscreen /> : "fullscreen"}
)} </div>
</IconButton> </IconButton>
</Stack> </Stack>
</Stack> </Stack>