Skip to content

Commit

Permalink
refactor: Replace icon components with their rounded variants for con…
Browse files Browse the repository at this point in the history
…sistency
  • Loading branch information
Ipmake committed Jan 28, 2025
1 parent 36c496b commit 6d964b7
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 64 deletions.
26 changes: 13 additions & 13 deletions frontend/src/components/AppBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ import { getAllLibraries, getSearch, getTranscodeImageURL } from "../plex";
import MetaScreen from "./MetaScreen";
import { useUserSessionStore } from "../states/UserSession";
import {
Favorite,
Fullscreen,
Logout,
People,
Search,
Settings,
FavoriteRounded,
FullscreenRounded,
LogoutRounded,
PeopleRounded,
SearchRounded,
SettingsRounded,
ShortcutRounded,
} from "@mui/icons-material";
import { useSyncInterfaceState } from "./PerPlexedSync";
Expand Down Expand Up @@ -136,7 +136,7 @@ function Appbar() {
}}
>
<ListItemIcon>
<Favorite fontSize="small" />
<FavoriteRounded fontSize="small" />
</ListItemIcon>
<ListItemText>Sponsor</ListItemText>
</MenuItem>
Expand All @@ -149,7 +149,7 @@ function Appbar() {
}}
>
<ListItemIcon>
<People fontSize="small" />
<PeopleRounded fontSize="small" />
</ListItemIcon>
<ListItemText>Watch2Gether</ListItemText>
</MenuItem>
Expand All @@ -163,7 +163,7 @@ function Appbar() {
}}
>
<ListItemIcon>
<Fullscreen fontSize="small" />
<FullscreenRounded fontSize="small" />
</ListItemIcon>
<ListItemText>Fullscreen</ListItemText>
</MenuItem>
Expand Down Expand Up @@ -201,7 +201,7 @@ S - Skip onscreen markers (intro, credits, etc)
disabled
>
<ListItemIcon>
<Settings fontSize="small" />
<SettingsRounded fontSize="small" />
</ListItemIcon>
<ListItemText>Settings</ListItemText>
</MenuItem>
Expand All @@ -214,7 +214,7 @@ S - Skip onscreen markers (intro, credits, etc)
}}
>
<ListItemIcon>
<Logout fontSize="small" />
<LogoutRounded fontSize="small" />
</ListItemIcon>
<ListItemText>Logout</ListItemText>
</MenuItem>
Expand Down Expand Up @@ -288,7 +288,7 @@ S - Skip onscreen markers (intro, credits, etc)
},
}}
>
<People />
<PeopleRounded />
</IconButton>
)}

Expand Down Expand Up @@ -417,7 +417,7 @@ function SearchBar() {
InputProps={{
startAdornment: (
<InputAdornment position="start">
<Search />
<SearchRounded />
</InputAdornment>
),
}}
Expand Down
14 changes: 7 additions & 7 deletions frontend/src/components/HeroDisplay.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {
PlayArrow,
PlayArrowRounded,
InfoOutlined,
VolumeOff,
VolumeUp,
Pause,
VolumeOffRounded,
VolumeUpRounded,
PauseRounded,
} from "@mui/icons-material";
import { Box, Typography, Button, IconButton } from "@mui/material";
import React, { useEffect, useState } from "react";
Expand Down Expand Up @@ -90,7 +90,7 @@ function HeroDisplay({ item }: { item: Plex.Metadata }) {
setPreviewVidPlaying(!previewVidPlaying);
}}
>
{previewVidPlaying ? <Pause /> : <PlayArrow />}
{previewVidPlaying ? <PauseRounded /> : <PlayArrowRounded />}
</IconButton>

<IconButton
Expand All @@ -101,7 +101,7 @@ function HeroDisplay({ item }: { item: Plex.Metadata }) {
setMetaScreenPlayerMuted(!MetaScreenPlayerMuted);
}}
>
{MetaScreenPlayerMuted ? <VolumeOff /> : <VolumeUp />}
{MetaScreenPlayerMuted ? <VolumeOffRounded /> : <VolumeUpRounded />}
</IconButton>
</Box>

Expand Down Expand Up @@ -265,7 +265,7 @@ function HeroDisplay({ item }: { item: Plex.Metadata }) {
navigate(`/watch/${item.ratingKey}`);
}}
>
<PlayArrow fontSize="medium" /> Play
<PlayArrowRounded fontSize="medium" /> Play
</Button>

<Button
Expand Down
30 changes: 15 additions & 15 deletions frontend/src/components/MetaScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ import {
getTranscodeImageURL,
} from "../plex";
import {
Bookmark,
BookmarkBorder,
CheckCircle,
Close,
PlayArrow,
VolumeOff,
VolumeUp,
BookmarkRounded,
BookmarkBorderRounded,
CheckCircleRounded,
CloseRounded,
PlayArrowRounded,
VolumeOffRounded,
VolumeUpRounded,
} from "@mui/icons-material";
import { durationToText } from "./MovieItemSlider";
import ReactPlayer from "react-player";
Expand Down Expand Up @@ -314,7 +314,7 @@ function MetaScreen() {
setSearchParams(new URLSearchParams());
}}
>
<Close fontSize="medium" />
<CloseRounded fontSize="medium" />
</IconButton>

<IconButton
Expand All @@ -327,7 +327,7 @@ function MetaScreen() {
setMetaScreenPlayerMuted(!MetaScreenPlayerMuted);
}}
>
{MetaScreenPlayerMuted ? <VolumeOff /> : <VolumeUp />}
{MetaScreenPlayerMuted ? <VolumeOffRounded /> : <VolumeUpRounded />}
</IconButton>
</Box>
</Box>
Expand Down Expand Up @@ -450,7 +450,7 @@ function MetaScreen() {
>
{data?.type === "show" &&
data?.leafCount === data?.viewedLeafCount && (
<CheckCircle
<CheckCircleRounded
sx={{
color: "#FFFFFF",
fontSize: "large",
Expand All @@ -459,7 +459,7 @@ function MetaScreen() {
/>
)}
{data?.type === "movie" && data?.viewCount && (
<CheckCircle
<CheckCircleRounded
sx={{
color: "#FFFFFF",
fontSize: "large",
Expand Down Expand Up @@ -593,7 +593,7 @@ function MetaScreen() {
}
}}
>
<PlayArrow fontSize="medium" /> Play{" "}
<PlayArrowRounded fontSize="medium" /> Play{" "}
{data?.type === "show" &&
data?.OnDeck &&
data?.OnDeck.Metadata &&
Expand Down Expand Up @@ -623,9 +623,9 @@ function MetaScreen() {
}}
>
{WatchList.isOnWatchList(data?.guid as string) ? (
<Bookmark fontSize="medium" />
<BookmarkRounded fontSize="medium" />
) : (
<BookmarkBorder fontSize="medium" />
<BookmarkBorderRounded fontSize="medium" />
)}
</IconButton>
</Box>
Expand Down Expand Up @@ -1175,7 +1175,7 @@ function EpisodeItem({
position: "relative",
}}
>
<PlayArrow
<PlayArrowRounded
sx={{
color: "#FFFFFF",
fontSize: "400%",
Expand Down
18 changes: 8 additions & 10 deletions frontend/src/components/MovieItem.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import {
CheckCircle,
PlayArrow,
InfoOutlined,
BookmarkBorder,
CheckCircleOutline,
Bookmark,
PlayArrowRounded,
BookmarkBorderRounded,
CheckCircleOutlineRounded,
BookmarkRounded,
} from "@mui/icons-material";
import {
Box,
Expand Down Expand Up @@ -166,7 +164,7 @@ function MovieItem({
}}
>
<Tooltip title="Watched" arrow placement="top">
<CheckCircleOutline
<CheckCircleOutlineRounded
fontSize="medium"
sx={{
transform: "rotate(-45deg)",
Expand Down Expand Up @@ -478,7 +476,7 @@ function MovieItem({
<CircularProgress size="small" />
) : (
<>
<PlayArrow fontSize="small" /> Play
<PlayArrowRounded fontSize="small" /> Play
</>
)}
</Button>
Expand Down Expand Up @@ -558,9 +556,9 @@ export function WatchListButton({ item }: { item: Plex.Metadata }) {
}}
>
{WatchList.isOnWatchList(item.guid) ? (
<Bookmark fontSize="small" />
<BookmarkRounded fontSize="small" />
) : (
<BookmarkBorder fontSize="small" />
<BookmarkBorderRounded fontSize="small" />
)}
</Button>
);
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/MovieItemSlider.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Box, Typography } from "@mui/material";
import React from "react";
import { getLibraryDir } from "../plex";
import { ArrowForwardIos } from "@mui/icons-material";
import { ArrowForwardIosRounded } from "@mui/icons-material";
import { useSearchParams } from "react-router-dom";
import MovieItem from "./MovieItem";

Expand Down Expand Up @@ -152,7 +152,7 @@ function MovieItemSlider({
}}
>
<Typography sx={{ fontSize: "1rem" }}>Browse</Typography>
<ArrowForwardIos fontSize="small" />
<ArrowForwardIosRounded fontSize="small" />
</Box>
)}
</Box>
Expand Down Expand Up @@ -231,7 +231,7 @@ function MovieItemSlider({
);
}}
>
<ArrowForwardIos
<ArrowForwardIosRounded
sx={{
transform: "rotate(180deg)",
}}
Expand Down Expand Up @@ -310,7 +310,7 @@ function MovieItemSlider({
);
}}
>
<ArrowForwardIos fontSize="large" />
<ArrowForwardIosRounded fontSize="large" />
</Box>
</Box>
</Box>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/PerPlexedSync.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import React, { useEffect } from "react";
import { create } from "zustand";
import { useSyncSessionState } from "../states/SyncSessionState";
import { ContentCopy } from "@mui/icons-material";
import { ContentCopyRounded } from "@mui/icons-material";
import { useNavigate } from "react-router-dom";

interface SyncInterfaceState {
Expand Down Expand Up @@ -143,7 +143,7 @@ function PerPlexedSync() {
navigator.clipboard.writeText(room || "");
}}
>
<ContentCopy color="primary" />
<ContentCopyRounded color="primary" />
</Button>
</Box>

Expand Down
16 changes: 8 additions & 8 deletions frontend/src/components/ToastManager.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {
PersonAdd,
PersonRemove,
PersonAddRounded,
PersonRemoveRounded,
PlayArrowRounded,
PlaylistAddRounded,
Pause,
PauseRounded,
RedoRounded,
ResetTv
ResetTvRounded
} from "@mui/icons-material";
import { Avatar, Box, Divider, Typography } from "@mui/material";
import { create } from "zustand";
Expand Down Expand Up @@ -197,7 +197,7 @@ export function Toast({
)}

{icon === "Pause" && (
<Pause
<PauseRounded
sx={{
color: "white",
fontSize: "2rem",
Expand All @@ -206,7 +206,7 @@ export function Toast({
)}

{icon === "PlaySet" && (
<ResetTv
<ResetTvRounded
sx={{
color: "white",
fontSize: "2rem",
Expand All @@ -215,7 +215,7 @@ export function Toast({
)}

{icon === "UserAdd" && (
<PersonAdd
<PersonAddRounded
sx={{
color: "white",
fontSize: "2rem",
Expand All @@ -224,7 +224,7 @@ export function Toast({
)}

{icon === "UserRemove" && (
<PersonRemove
<PersonRemoveRounded
sx={{
color: "white",
fontSize: "2rem",
Expand Down
Loading

0 comments on commit 6d964b7

Please sign in to comment.