refactor(web): change all icons to material-symbols from mdi
This commit is contained in:
94 files changed
+393
-1297
No files matched your search
@@ -28,18 +28,10 @@ import { useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import { delServer } from "../../utils/storage/servers";
|
||||
import { delUser } from "../../utils/storage/user";
|
||||
import { useDrawerStore } from "../../utils/store/drawer";
|
||||
import { MdiAccount } from "../icons/mdiAccount";
|
||||
import { MdiArrowLeft } from "../icons/mdiArrowLeft";
|
||||
import { MdiCog } from "../icons/mdiCog";
|
||||
import { MdiDelete } from "../icons/mdiDelete";
|
||||
import { MdiHeartOutline } from "../icons/mdiHeartOutline";
|
||||
import { MdiInformation } from "../icons/mdiInformation";
|
||||
import { MdiMenu } from "../icons/mdiMenu";
|
||||
import "./appBar.module.scss";
|
||||
|
||||
import { EventEmitter as event } from "../../eventEmitter";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
import { MdiLogoutVariant } from "../icons/mdiLogoutVariant";
|
||||
|
||||
import { getTypeIcon } from "../../components/utils/iconsCollection";
|
||||
|
||||
@@ -365,7 +357,9 @@ export const AppBar = () => {
|
||||
{user.isSuccess &&
|
||||
(user.data.PrimaryImageTag === undefined ? (
|
||||
<Avatar className="appBar-avatar" alt={user.data.Name}>
|
||||
<MdiAccount className="appBar-avatar-icon" />
|
||||
<span className="material-symbols-rounded appBar-avatar-icon">
|
||||
account_circle
|
||||
</span>
|
||||
</Avatar>
|
||||
) : (
|
||||
<Avatar
|
||||
@@ -373,7 +367,9 @@ export const AppBar = () => {
|
||||
src={`${api.basePath}/Users/${user.data.Id}/Images/Primary`}
|
||||
alt={user.data.Name}
|
||||
>
|
||||
<MdiAccount className="appBar-avatar-icon" />
|
||||
<span className="material-symbols-rounded appBar-avatar-icon">
|
||||
account_circle
|
||||
</span>
|
||||
</Avatar>
|
||||
))}
|
||||
</IconButton>
|
||||
|
||||
@@ -2,7 +2,6 @@ import AppBar from "@mui/material/AppBar";
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import Toolbar from "@mui/material/Toolbar";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { MdiArrowLeft } from "../icons/mdiArrowLeft";
|
||||
|
||||
export const AppBarBackOnly = () => {
|
||||
const navigate = useNavigate();
|
||||
@@ -22,7 +21,7 @@ export const AppBarBackOnly = () => {
|
||||
onClick={handleBack}
|
||||
sx={{ mr: 2 }}
|
||||
>
|
||||
<MdiArrowLeft />
|
||||
<span className="material-symbols-rounded">arrow_back</span>
|
||||
</IconButton>
|
||||
</Toolbar>
|
||||
</AppBar>
|
||||
|
||||
@@ -3,8 +3,6 @@ import React from "react";
|
||||
|
||||
import Box from "@mui/material/Box";
|
||||
|
||||
import { MdiAccount } from "../icons/mdiAccount";
|
||||
|
||||
import "./avatar.module.scss";
|
||||
|
||||
import { useApi } from "../../utils/store/api";
|
||||
@@ -21,16 +19,14 @@ export const AvatarImage = ({ userId }) => {
|
||||
/>
|
||||
|
||||
<div className="avatar-image-icon-container">
|
||||
<MdiAccount className="avatar-image-icon" />
|
||||
<span className="material-symbols-rounded avatar-image-icon">
|
||||
account_circle
|
||||
</span>
|
||||
</div>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export const AvatarSideMenu = ({ userName }) => {
|
||||
return <div />;
|
||||
};
|
||||
|
||||
AvatarImage.propType = {
|
||||
userId: PropTypes.string.isRequired,
|
||||
userImageTags: PropTypes.any,
|
||||
|
||||
@@ -9,8 +9,6 @@ import CircularProgress from "@mui/material/CircularProgress";
|
||||
import { pink } from "@mui/material/colors";
|
||||
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
||||
import { useSnackbar } from "notistack";
|
||||
import { MdiHeart } from "../icons/mdiHeart";
|
||||
import { MdiHeartOutline } from "../icons/mdiHeartOutline";
|
||||
|
||||
import { useApi } from "../../utils/store/api";
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ import { useMutation, useQueryClient } from "@tanstack/react-query";
|
||||
import { getPlaystateApi } from "@jellyfin/sdk/lib/utils/api/playstate-api";
|
||||
import { useSnackbar } from "notistack";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
import { MdiCheck } from "../icons/mdiCheck";
|
||||
|
||||
const MarkPlayedButton = ({ itemId, isPlayed, queryKey, userId, itemName }) => {
|
||||
const [api] = useApi((state) => [state.api]);
|
||||
|
||||
@@ -8,7 +8,6 @@ import Typography from "@mui/material/Typography";
|
||||
|
||||
import { Blurhash } from "react-blurhash";
|
||||
|
||||
import { MdiCheck } from "../icons/mdiCheck";
|
||||
import "./card.module.scss";
|
||||
|
||||
import { getRuntimeCompact } from "../../utils/date/time";
|
||||
@@ -16,7 +15,6 @@ import { useApi } from "../../utils/store/api";
|
||||
import LikeButton from "../buttons/likeButton";
|
||||
import MarkPlayedButton from "../buttons/markPlayedButton";
|
||||
import PlayButton from "../buttons/playButton";
|
||||
import { MdiTelevisionClassic } from "../icons/mdiTelevisionClassic";
|
||||
|
||||
/**
|
||||
* @typedef {Object} Props
|
||||
|
||||
@@ -4,9 +4,6 @@ import React, { useState } from "react";
|
||||
import Carousel from "react-multi-carousel";
|
||||
import "react-multi-carousel/lib/styles.css";
|
||||
|
||||
import { MdiChevronLeft } from "../icons/mdiChevronLeft";
|
||||
import { MdiChevronRight } from "../icons/mdiChevronRight";
|
||||
|
||||
import Box from "@mui/material/Box";
|
||||
import ButtonGroup from "@mui/material/ButtonGroup";
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
|
||||
@@ -2,8 +2,6 @@ import { AnimatePresence, motion } from "framer-motion";
|
||||
import React, { useEffect, useState } from "react";
|
||||
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import { MdiChevronLeft } from "../icons/mdiChevronLeft";
|
||||
import { MdiChevronRight } from "../icons/mdiChevronRight";
|
||||
|
||||
import { useCarouselStore } from "../../utils/store/carousel";
|
||||
import "./carousel.scss";
|
||||
|
||||
@@ -10,16 +10,12 @@ import Stack from "@mui/material/Stack";
|
||||
import Typography from "@mui/material/Typography";
|
||||
|
||||
import { yellow } from "@mui/material/colors";
|
||||
import ErrorBoundary from "../errorBoundary";
|
||||
|
||||
import { green, red } from "@mui/material/colors";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { endsAt, getRuntime } from "../../utils/date/time";
|
||||
import CarouselSlideError from "../errors/carousel";
|
||||
import { MdiChevronRight } from "../icons/mdiChevronRight";
|
||||
import { MdiStar } from "../icons/mdiStar";
|
||||
import { MediaTypeIconCollection, getTypeIcon } from "../utils/iconsCollection";
|
||||
import { getTypeIcon } from "../utils/iconsCollection";
|
||||
|
||||
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
||||
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||
@@ -71,323 +67,321 @@ const CarouselSlide = ({ item }) => {
|
||||
const [animationDirection] = useCarouselStore((state) => [state.direction]);
|
||||
|
||||
return (
|
||||
<ErrorBoundary fallback={<CarouselSlideError itemName={item.Name} />}>
|
||||
<Paper
|
||||
className="hero-carousel-slide"
|
||||
sx={{
|
||||
background: "transparent",
|
||||
px: 3,
|
||||
}}
|
||||
elevation={6}
|
||||
>
|
||||
<div className="hero-carousel-background-container">
|
||||
{!!item.ImageBlurHashes.Backdrop && (
|
||||
<>
|
||||
{Object.keys(item.ImageBlurHashes.Backdrop).length !== 0 && (
|
||||
<Blurhash
|
||||
hash={
|
||||
item.ImageBlurHashes.Backdrop[
|
||||
Object.keys(item.ImageBlurHashes.Backdrop)[0]
|
||||
]
|
||||
}
|
||||
// hash="LEHV6nWB2yk8pyo0adR*.7kCMdnj"
|
||||
width="256"
|
||||
height="179.2"
|
||||
resolutionX={64}
|
||||
resolutionY={45}
|
||||
className="hero-carousel-background-blurhash"
|
||||
punch={1.2}
|
||||
/>
|
||||
)}
|
||||
<img
|
||||
alt={item.Name}
|
||||
className="hero-carousel-background-image"
|
||||
src={
|
||||
item.ParentBackdropItemId
|
||||
? `${api.basePath}/Items/${item.ParentBackdropItemId}/Images/Backdrop?quality=80`
|
||||
: `${api.basePath}/Items/${item.Id}/Images/Backdrop?quality=80`
|
||||
<Paper
|
||||
className="hero-carousel-slide"
|
||||
sx={{
|
||||
background: "transparent",
|
||||
px: 3,
|
||||
}}
|
||||
elevation={6}
|
||||
>
|
||||
<div className="hero-carousel-background-container">
|
||||
{!!item.ImageBlurHashes.Backdrop && (
|
||||
<>
|
||||
{Object.keys(item.ImageBlurHashes.Backdrop).length !== 0 && (
|
||||
<Blurhash
|
||||
hash={
|
||||
item.ImageBlurHashes.Backdrop[
|
||||
Object.keys(item.ImageBlurHashes.Backdrop)[0]
|
||||
]
|
||||
}
|
||||
style={{
|
||||
opacity: 0,
|
||||
}}
|
||||
onLoad={(e) => {
|
||||
e.target.style.opacity = 1;
|
||||
}}
|
||||
loading="eager"
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
<div className="hero-carousel-background-icon-container">
|
||||
{getTypeIcon(item.Type)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="hero-carousel-detail">
|
||||
<Typography
|
||||
component={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",
|
||||
}}
|
||||
key={item.Id}
|
||||
variant="h2"
|
||||
className="hero-carousel-text"
|
||||
sx={{
|
||||
mb: "5px",
|
||||
}}
|
||||
overflow="visible"
|
||||
>
|
||||
{!item.ImageTags.Logo ? (
|
||||
item.Name
|
||||
) : (
|
||||
<img
|
||||
alt={item.Name}
|
||||
className="hero-carousel-text-logo"
|
||||
src={`${api.basePath}/Items/${item.Id}/Images/Logo?quality=90&tag=${item.ImageTags.Logo}`}
|
||||
style={{
|
||||
opacity: 0,
|
||||
transition: "opacity 0.2s",
|
||||
objectFit: "contain",
|
||||
}}
|
||||
onLoad={(e) => {
|
||||
e.target.style.opacity = 1;
|
||||
}}
|
||||
// hash="LEHV6nWB2yk8pyo0adR*.7kCMdnj"
|
||||
width="256"
|
||||
height="179.2"
|
||||
resolutionX={64}
|
||||
resolutionY={45}
|
||||
className="hero-carousel-background-blurhash"
|
||||
punch={1.2}
|
||||
/>
|
||||
)}
|
||||
</Typography>
|
||||
<Stack
|
||||
component={motion.div}
|
||||
initial={{
|
||||
transform:
|
||||
animationDirection === "right"
|
||||
? "translateX(20px)"
|
||||
: "translateX(-20px)",
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
transform: "translateX(0px)",
|
||||
opacity: 1,
|
||||
}}
|
||||
exit={{
|
||||
transform:
|
||||
animationDirection === "right"
|
||||
? "translateX(-20px)"
|
||||
: "translateX(20px)",
|
||||
|
||||
opacity: 0,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
direction="row"
|
||||
gap={2}
|
||||
className="hero-carousel-info"
|
||||
mt={1}
|
||||
justifyItems="flex-start"
|
||||
alignItems="center"
|
||||
>
|
||||
<Typography style={{ opacity: "0.8" }} variant="subtitle1">
|
||||
{item.ProductionYear ? item.ProductionYear : "Unknown"}
|
||||
</Typography>
|
||||
<Chip variant="filled" label={item.OfficialRating ?? "Not Rated"} />
|
||||
|
||||
{item.CommunityRating && (
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
gap: "0.25em",
|
||||
alignItems: "center",
|
||||
}}
|
||||
className="hero-carousel-info-rating"
|
||||
>
|
||||
<div
|
||||
className="material-symbols-rounded "
|
||||
style={{
|
||||
// fontSize: "2.2em",
|
||||
color: yellow[400],
|
||||
fontVariationSettings:
|
||||
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
|
||||
}}
|
||||
>
|
||||
star
|
||||
</div>
|
||||
<Typography
|
||||
style={{
|
||||
opacity: "0.8",
|
||||
}}
|
||||
variant="subtitle1"
|
||||
>
|
||||
{Math.round(item.CommunityRating * 10) / 10}
|
||||
</Typography>
|
||||
</div>
|
||||
)}
|
||||
{Boolean(item.CriticRating) && (
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
gap: "0.25em",
|
||||
alignItems: "center",
|
||||
}}
|
||||
className="hero-carousel-info-rating"
|
||||
>
|
||||
<div
|
||||
className="material-symbols-rounded "
|
||||
style={{
|
||||
color: item.CriticRating > 50 ? green[400] : red[400],
|
||||
fontVariationSettings:
|
||||
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
|
||||
}}
|
||||
>
|
||||
{item.CriticRating > 50 ? "thumb_up" : "thumb_down"}
|
||||
</div>
|
||||
<Typography
|
||||
style={{
|
||||
opacity: "0.8",
|
||||
}}
|
||||
variant="subtitle1"
|
||||
>
|
||||
{item.CriticRating}
|
||||
</Typography>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{!!item.RunTimeTicks && (
|
||||
<Typography style={{ opacity: "0.8" }} variant="subtitle1">
|
||||
{getRuntime(item.RunTimeTicks)}
|
||||
</Typography>
|
||||
)}
|
||||
{!!item.RunTimeTicks && (
|
||||
<Typography style={{ opacity: "0.8" }} variant="subtitle1">
|
||||
{endsAt(item.RunTimeTicks)}
|
||||
</Typography>
|
||||
)}
|
||||
</Stack>
|
||||
<Typography
|
||||
component={motion.div}
|
||||
initial={{
|
||||
transform:
|
||||
animationDirection === "right"
|
||||
? "translateX(20px)"
|
||||
: "translateX(-20px)",
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
transform: "translateX(0px)",
|
||||
opacity: 1,
|
||||
}}
|
||||
exit={{
|
||||
transform:
|
||||
animationDirection === "right"
|
||||
? "translateX(-20px)"
|
||||
: "translateX(20px)",
|
||||
|
||||
opacity: 0,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
variant="subtitle1"
|
||||
className="hero-carousel-text"
|
||||
sx={{
|
||||
display: "-webkit-box",
|
||||
maxWidth: "70%",
|
||||
maxHeight: "50%",
|
||||
textOverflow: "ellipsis",
|
||||
overflow: "hidden",
|
||||
WebkitLineClamp: "4",
|
||||
WebkitBoxOrient: "vertical",
|
||||
}}
|
||||
>
|
||||
{item.Overview}
|
||||
</Typography>
|
||||
|
||||
<Stack
|
||||
mt={3}
|
||||
direction="row"
|
||||
gap={3}
|
||||
width="100%"
|
||||
className="hero-carousel-button-container"
|
||||
alignItems="center"
|
||||
>
|
||||
<PlayButton
|
||||
itemId={item.Id}
|
||||
userId={user.data.Id}
|
||||
itemType={item.Type}
|
||||
currentAudioTrack={0}
|
||||
currentSubTrack={0}
|
||||
currentVideoTrack={0}
|
||||
buttonProps={{
|
||||
size: "large",
|
||||
<img
|
||||
alt={item.Name}
|
||||
className="hero-carousel-background-image"
|
||||
src={
|
||||
item.ParentBackdropItemId
|
||||
? `${api.basePath}/Items/${item.ParentBackdropItemId}/Images/Backdrop?quality=80`
|
||||
: `${api.basePath}/Items/${item.Id}/Images/Backdrop?quality=80`
|
||||
}
|
||||
style={{
|
||||
opacity: 0,
|
||||
}}
|
||||
itemUserData={item.UserData}
|
||||
audio={
|
||||
item.Type === BaseItemKind.MusicAlbum ||
|
||||
item.Type === BaseItemKind.Audio ||
|
||||
item.Type === BaseItemKind.AudioBook ||
|
||||
item.Type === BaseItemKind.Playlist
|
||||
}
|
||||
playlistItem={item.Type === BaseItemKind.Playlist}
|
||||
playlistItemId={item.Id}
|
||||
onLoad={(e) => {
|
||||
e.target.style.opacity = 1;
|
||||
}}
|
||||
loading="eager"
|
||||
/>
|
||||
|
||||
<Button
|
||||
size="large"
|
||||
color="white"
|
||||
variant="outlined"
|
||||
endIcon={
|
||||
<div
|
||||
className="material-symbols-rounded"
|
||||
style={{
|
||||
fontSize: "2em",
|
||||
}}
|
||||
>
|
||||
chevron_right
|
||||
</div>
|
||||
}
|
||||
onClick={handleMoreInfo}
|
||||
>
|
||||
More info
|
||||
</Button>
|
||||
<Stack direction="row" gap={1}>
|
||||
<LikeButton
|
||||
itemId={item.Id}
|
||||
queryKey={["home", "latestMedia"]}
|
||||
userId={user.data.Id}
|
||||
isFavorite={item.UserData.IsFavorite}
|
||||
itemName={item.Name}
|
||||
/>
|
||||
<MarkPlayedButton
|
||||
itemId={item.Id}
|
||||
queryKey={["home", "latestMedia"]}
|
||||
userId={user.data.Id}
|
||||
isPlayed={item.UserData.Played}
|
||||
itemName={item.Name}
|
||||
/>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</>
|
||||
)}
|
||||
<div className="hero-carousel-background-icon-container">
|
||||
{getTypeIcon(item.Type)}
|
||||
</div>
|
||||
</Paper>
|
||||
</ErrorBoundary>
|
||||
</div>
|
||||
<div className="hero-carousel-detail">
|
||||
<Typography
|
||||
component={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",
|
||||
}}
|
||||
key={item.Id}
|
||||
variant="h2"
|
||||
className="hero-carousel-text"
|
||||
sx={{
|
||||
mb: "5px",
|
||||
}}
|
||||
overflow="visible"
|
||||
>
|
||||
{!item.ImageTags.Logo ? (
|
||||
item.Name
|
||||
) : (
|
||||
<img
|
||||
alt={item.Name}
|
||||
className="hero-carousel-text-logo"
|
||||
src={`${api.basePath}/Items/${item.Id}/Images/Logo?quality=90&tag=${item.ImageTags.Logo}`}
|
||||
style={{
|
||||
opacity: 0,
|
||||
transition: "opacity 0.2s",
|
||||
objectFit: "contain",
|
||||
}}
|
||||
onLoad={(e) => {
|
||||
e.target.style.opacity = 1;
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</Typography>
|
||||
<Stack
|
||||
component={motion.div}
|
||||
initial={{
|
||||
transform:
|
||||
animationDirection === "right"
|
||||
? "translateX(20px)"
|
||||
: "translateX(-20px)",
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
transform: "translateX(0px)",
|
||||
opacity: 1,
|
||||
}}
|
||||
exit={{
|
||||
transform:
|
||||
animationDirection === "right"
|
||||
? "translateX(-20px)"
|
||||
: "translateX(20px)",
|
||||
|
||||
opacity: 0,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
direction="row"
|
||||
gap={2}
|
||||
className="hero-carousel-info"
|
||||
mt={1}
|
||||
justifyItems="flex-start"
|
||||
alignItems="center"
|
||||
>
|
||||
<Typography style={{ opacity: "0.8" }} variant="subtitle1">
|
||||
{item.ProductionYear ? item.ProductionYear : "Unknown"}
|
||||
</Typography>
|
||||
<Chip variant="filled" label={item.OfficialRating ?? "Not Rated"} />
|
||||
|
||||
{item.CommunityRating && (
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
gap: "0.25em",
|
||||
alignItems: "center",
|
||||
}}
|
||||
className="hero-carousel-info-rating"
|
||||
>
|
||||
<div
|
||||
className="material-symbols-rounded "
|
||||
style={{
|
||||
// fontSize: "2.2em",
|
||||
color: yellow[400],
|
||||
fontVariationSettings:
|
||||
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
|
||||
}}
|
||||
>
|
||||
star
|
||||
</div>
|
||||
<Typography
|
||||
style={{
|
||||
opacity: "0.8",
|
||||
}}
|
||||
variant="subtitle1"
|
||||
>
|
||||
{Math.round(item.CommunityRating * 10) / 10}
|
||||
</Typography>
|
||||
</div>
|
||||
)}
|
||||
{Boolean(item.CriticRating) && (
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
gap: "0.25em",
|
||||
alignItems: "center",
|
||||
}}
|
||||
className="hero-carousel-info-rating"
|
||||
>
|
||||
<div
|
||||
className="material-symbols-rounded "
|
||||
style={{
|
||||
color: item.CriticRating > 50 ? green[400] : red[400],
|
||||
fontVariationSettings:
|
||||
'"FILL" 1, "wght" 300, "GRAD" 25, "opsz" 40',
|
||||
}}
|
||||
>
|
||||
{item.CriticRating > 50 ? "thumb_up" : "thumb_down"}
|
||||
</div>
|
||||
<Typography
|
||||
style={{
|
||||
opacity: "0.8",
|
||||
}}
|
||||
variant="subtitle1"
|
||||
>
|
||||
{item.CriticRating}
|
||||
</Typography>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{!!item.RunTimeTicks && (
|
||||
<Typography style={{ opacity: "0.8" }} variant="subtitle1">
|
||||
{getRuntime(item.RunTimeTicks)}
|
||||
</Typography>
|
||||
)}
|
||||
{!!item.RunTimeTicks && (
|
||||
<Typography style={{ opacity: "0.8" }} variant="subtitle1">
|
||||
{endsAt(item.RunTimeTicks)}
|
||||
</Typography>
|
||||
)}
|
||||
</Stack>
|
||||
<Typography
|
||||
component={motion.div}
|
||||
initial={{
|
||||
transform:
|
||||
animationDirection === "right"
|
||||
? "translateX(20px)"
|
||||
: "translateX(-20px)",
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
transform: "translateX(0px)",
|
||||
opacity: 1,
|
||||
}}
|
||||
exit={{
|
||||
transform:
|
||||
animationDirection === "right"
|
||||
? "translateX(-20px)"
|
||||
: "translateX(20px)",
|
||||
|
||||
opacity: 0,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
variant="subtitle1"
|
||||
className="hero-carousel-text"
|
||||
sx={{
|
||||
display: "-webkit-box",
|
||||
maxWidth: "70%",
|
||||
maxHeight: "50%",
|
||||
textOverflow: "ellipsis",
|
||||
overflow: "hidden",
|
||||
WebkitLineClamp: "4",
|
||||
WebkitBoxOrient: "vertical",
|
||||
}}
|
||||
>
|
||||
{item.Overview}
|
||||
</Typography>
|
||||
|
||||
<Stack
|
||||
mt={3}
|
||||
direction="row"
|
||||
gap={3}
|
||||
width="100%"
|
||||
className="hero-carousel-button-container"
|
||||
alignItems="center"
|
||||
>
|
||||
<PlayButton
|
||||
itemId={item.Id}
|
||||
userId={user.data.Id}
|
||||
itemType={item.Type}
|
||||
currentAudioTrack={0}
|
||||
currentSubTrack={0}
|
||||
currentVideoTrack={0}
|
||||
buttonProps={{
|
||||
size: "large",
|
||||
}}
|
||||
itemUserData={item.UserData}
|
||||
audio={
|
||||
item.Type === BaseItemKind.MusicAlbum ||
|
||||
item.Type === BaseItemKind.Audio ||
|
||||
item.Type === BaseItemKind.AudioBook ||
|
||||
item.Type === BaseItemKind.Playlist
|
||||
}
|
||||
playlistItem={item.Type === BaseItemKind.Playlist}
|
||||
playlistItemId={item.Id}
|
||||
/>
|
||||
|
||||
<Button
|
||||
size="large"
|
||||
color="white"
|
||||
variant="outlined"
|
||||
endIcon={
|
||||
<div
|
||||
className="material-symbols-rounded"
|
||||
style={{
|
||||
fontSize: "2em",
|
||||
}}
|
||||
>
|
||||
chevron_right
|
||||
</div>
|
||||
}
|
||||
onClick={handleMoreInfo}
|
||||
>
|
||||
More info
|
||||
</Button>
|
||||
<Stack direction="row" gap={1}>
|
||||
<LikeButton
|
||||
itemId={item.Id}
|
||||
queryKey={["home", "latestMedia"]}
|
||||
userId={user.data.Id}
|
||||
isFavorite={item.UserData.IsFavorite}
|
||||
itemName={item.Name}
|
||||
/>
|
||||
<MarkPlayedButton
|
||||
itemId={item.Id}
|
||||
queryKey={["home", "latestMedia"]}
|
||||
userId={user.data.Id}
|
||||
isPlayed={item.UserData.Played}
|
||||
itemName={item.Name}
|
||||
/>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</div>
|
||||
</Paper>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
import Paper from "@mui/material/Paper";
|
||||
import Stack from "@mui/material/Stack";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import React from "react";
|
||||
import { MdiEmoticonDead } from "../icons/mdiEmoticonDead";
|
||||
|
||||
import slideBackground from "../../assets/errorbg.png";
|
||||
|
||||
const CarouselSlideError = ({ itemName }) => {
|
||||
return (
|
||||
<Paper className="hero-carousel-slide">
|
||||
<Stack
|
||||
justifyContent="center"
|
||||
alignItems="center"
|
||||
sx={{
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
background: `url(${slideBackground})`,
|
||||
backgroundSize: "cover",
|
||||
}}
|
||||
>
|
||||
<MdiEmoticonDead sx={{ fontSize: "10em", opacity: "0.8" }} />
|
||||
<Typography mb={2} variant="h4" sx={{ opacity: "0.5" }}>
|
||||
Error caused by
|
||||
</Typography>
|
||||
<Typography
|
||||
mt={2}
|
||||
variant="h3"
|
||||
sx={{
|
||||
background: "rgb(255 255 255 /0.1)",
|
||||
padding: 1,
|
||||
borderRadius: 3,
|
||||
}}
|
||||
>
|
||||
{itemName}
|
||||
</Typography>
|
||||
</Stack>
|
||||
</Paper>
|
||||
);
|
||||
};
|
||||
|
||||
export default CarouselSlideError;
|
||||
@@ -1,12 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
import React from "react";
|
||||
|
||||
const Icon = (icon, extraProps) => {
|
||||
return (
|
||||
<SvgIcon {...extraProps}>
|
||||
<path d={icon} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
|
||||
export default Icon;
|
||||
@@ -1,12 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
import { MdiChevronLeft } from "./mdiChevronLeft";
|
||||
|
||||
import { mdiAccount } from "@mdi/js";
|
||||
|
||||
export const MdiAccount = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiAccount} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiAccountMusic } from "@mdi/js";
|
||||
|
||||
export const MdiAccountMusic = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiAccountMusic} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiAccountTie } from "@mdi/js";
|
||||
|
||||
export const MdiAccountTie = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiAccountTie} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiAlbum } from "@mdi/js";
|
||||
|
||||
export const MdiAlbum = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiAlbum} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiAlertDecagram } from "@mdi/js";
|
||||
|
||||
export const MdiAlertDecagram = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiAlertDecagram} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiArrowLeft } from "@mdi/js";
|
||||
|
||||
export const MdiArrowLeft = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiArrowLeft} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiBackburger } from "@mdi/js";
|
||||
|
||||
export const MdiBackburger = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiBackburger} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiBook } from "@mdi/js";
|
||||
|
||||
export const MdiBook = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiBook} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiBookMultiple } from "@mdi/js";
|
||||
|
||||
export const MdiBookMultiple = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiBookMultiple} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiBookMusic } from "@mdi/js";
|
||||
|
||||
export const MdiBookMusic = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiBookMusic} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiCheck } from "@mdi/js";
|
||||
|
||||
export const MdiCheck = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiCheck} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiChevronDown } from "@mdi/js";
|
||||
|
||||
export const MdiChevronDown = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiChevronDown} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiChevronLeft } from "@mdi/js";
|
||||
|
||||
export const MdiChevronLeft = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiChevronLeft} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiChevronRight } from "@mdi/js";
|
||||
|
||||
export const MdiChevronRight = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiChevronRight} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiClockOutline } from "@mdi/js";
|
||||
|
||||
export const MdiClockOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiClockOutline} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiClose } from "@mdi/js";
|
||||
|
||||
export const MdiClose = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiClose} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
import { MdiChevronLeft } from "./mdiChevronLeft";
|
||||
|
||||
import { mdiCog } from "@mdi/js";
|
||||
|
||||
export const MdiCog = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiCog} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiCogSync } from "@mdi/js";
|
||||
|
||||
export const MdiCogSync = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiCogSync} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiDelete } from "@mdi/js";
|
||||
|
||||
export const MdiDelete = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiDelete} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiDramaMasks } from "@mdi/js";
|
||||
|
||||
export const MdiDramaMasks = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiDramaMasks} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiEmoticonCry } from "@mdi/js";
|
||||
|
||||
export const MdiEmoticonCry = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiEmoticonCry} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiEmoticonCryOutline } from "@mdi/js";
|
||||
|
||||
export const MdiEmoticonCryOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiEmoticonCryOutline} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiEmoticonDead } from "@mdi/js";
|
||||
|
||||
export const MdiEmoticonDead = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiEmoticonDead} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiEyeOffOutline } from "@mdi/js";
|
||||
|
||||
export const MdiEyeOffOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiEyeOffOutline} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiEyeOutline } from "@mdi/js";
|
||||
|
||||
export const MdiEyeOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiEyeOutline} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiFastForward } from "@mdi/js";
|
||||
|
||||
export const MdiFastForward = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiFastForward} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiFilmstrip } from "@mdi/js";
|
||||
|
||||
export const MdiFilmstrip = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiFilmstrip} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiFilmstripBoxMultiple } from "@mdi/js";
|
||||
|
||||
export const MdiFilmstripBoxMultiple = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiFilmstripBoxMultiple} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiFilterOutline } from "@mdi/js";
|
||||
|
||||
export const MdiFilterOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiFilterOutline} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiFolderMultiple } from "@mdi/js";
|
||||
|
||||
export const MdiFolderMultiple = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiFolderMultiple} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiFolderMusicOutline } from "@mdi/js";
|
||||
|
||||
export const MdiFolderMusicOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiFolderMusicOutline} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiFolderOutline } from "@mdi/js";
|
||||
|
||||
export const MdiFolderOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiFolderOutline} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiFullscreen } from "@mdi/js";
|
||||
|
||||
export const MdiFullscreen = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiFullscreen} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiFullscreenExit } from "@mdi/js";
|
||||
|
||||
export const MdiFullscreenExit = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiFullscreenExit} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiHdr } from "@mdi/js";
|
||||
|
||||
export const MdiHdr = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiHdr} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiHeart } from "@mdi/js";
|
||||
|
||||
export const MdiHeart = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiHeart} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiHeartOutline } from "@mdi/js";
|
||||
|
||||
export const MdiHeartOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiHeartOutline} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiHomeVariant } from "@mdi/js";
|
||||
|
||||
export const MdiHomeVariant = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiHomeVariant} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiHomeVariantOutline } from "@mdi/js";
|
||||
|
||||
export const MdiHomeVariantOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiHomeVariantOutline} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiImage } from "@mdi/js";
|
||||
|
||||
export const MdiImage = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiImage} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiImageMultiple } from "@mdi/js";
|
||||
|
||||
export const MdiImageMultiple = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiImageMultiple} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiInformation } from "@mdi/js";
|
||||
|
||||
export const MdiInformation = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiInformation} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiLogoutVariant } from "@mdi/js";
|
||||
|
||||
export const MdiLogoutVariant = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiLogoutVariant} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiMagnify } from "@mdi/js";
|
||||
|
||||
export const MdiMagnify = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiMagnify} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiMenu } from "@mdi/js";
|
||||
|
||||
export const MdiMenu = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiMenu} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiMicrophone } from "@mdi/js";
|
||||
|
||||
export const MdiMicrophone = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiMicrophone} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiMovieOutline } from "@mdi/js";
|
||||
|
||||
export const MdiMovieOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiMovieOutline} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiMultimedia } from "@mdi/js";
|
||||
|
||||
export const MdiMultimedia = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiMultimedia} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiMusic } from "@mdi/js";
|
||||
|
||||
export const MdiMusic = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiMusic} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiMusicBoxMultipleOutline } from "@mdi/js";
|
||||
|
||||
export const MdiMusicBoxMultipleOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiMusicBoxMultipleOutline} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiPause } from "@mdi/js";
|
||||
|
||||
export const MdiPause = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiPause} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiPictureInPictureBottomRight } from "@mdi/js";
|
||||
|
||||
export const MdiPictureInPictureBottomRight = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiPictureInPictureBottomRight} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiPlay } from "@mdi/js";
|
||||
|
||||
export const MdiPlay = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiPlay} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiPlayBoxMultiple } from "@mdi/js";
|
||||
|
||||
export const MdiPlayBoxMultiple = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiPlayBoxMultiple} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiPlayOutline } from "@mdi/js";
|
||||
|
||||
export const MdiPlayOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiPlayOutline} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiPlaySpeed } from "@mdi/js";
|
||||
|
||||
export const MdiPlaySpeed = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiPlaySpeed} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiPlaylistMusicOutline } from "@mdi/js";
|
||||
|
||||
export const MdiPlaylistMusicOutline = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiPlaylistMusicOutline} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiRewind } from "@mdi/js";
|
||||
|
||||
export const MdiRewind = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiRewind} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiSkipNext } from "@mdi/js";
|
||||
|
||||
export const MdiSkipNext = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiSkipNext} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiSkipPrevious } from "@mdi/js";
|
||||
|
||||
export const MdiSkipPrevious = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiSkipPrevious} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiSortAscending } from "@mdi/js";
|
||||
|
||||
export const MdiSortAscending = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiSortAscending} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiSortDescending } from "@mdi/js";
|
||||
|
||||
export const MdiSortDescending = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiSortDescending} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiStar } from "@mdi/js";
|
||||
|
||||
export const MdiStar = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiStar} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiStarHalfFull } from "@mdi/js";
|
||||
|
||||
export const MdiStarHalfFull = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiStarHalfFull} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiTelevision } from "@mdi/js";
|
||||
|
||||
export const MdiTelevision = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiTelevision} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiTelevisionClassic } from "@mdi/js";
|
||||
|
||||
export const MdiTelevisionClassic = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiTelevisionClassic} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiVolumeHigh } from "@mdi/js";
|
||||
|
||||
export const MdiVolumeHigh = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiVolumeHigh} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiVolumeOff } from "@mdi/js";
|
||||
|
||||
export const MdiVolumeOff = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiVolumeOff} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
import SvgIcon from "@mui/material/SvgIcon";
|
||||
|
||||
import { mdiYoutube } from "@mdi/js";
|
||||
|
||||
export const MdiYoutube = (props) => {
|
||||
return (
|
||||
<SvgIcon {...props}>
|
||||
<path d={mdiYoutube} />
|
||||
</SvgIcon>
|
||||
);
|
||||
};
|
||||
@@ -12,9 +12,6 @@ import { useQuery } from "@tanstack/react-query";
|
||||
|
||||
import { getRuntimeMusic } from "../../../utils/date/time";
|
||||
|
||||
import { MdiAlbum } from "../../icons/mdiAlbum";
|
||||
import { MdiClockOutline } from "../../icons/mdiClockOutline";
|
||||
|
||||
import { SortOrder } from "@jellyfin/sdk/lib/generated-client";
|
||||
import { useApi } from "../../../utils/store/api";
|
||||
import { useAudioPlayback } from "../../../utils/store/audioPlayback";
|
||||
@@ -91,7 +88,12 @@ export const ArtistAlbum = ({ user, album, boxProps }) => {
|
||||
onLoad={() => setImgLoaded(true)}
|
||||
/>
|
||||
<div className="album-image-icon-container">
|
||||
<MdiAlbum className="album-image-icon" sx={{ fontSize: "6em" }} />
|
||||
<span
|
||||
className="material-symbols-rounded album-image-icon"
|
||||
sx={{ fontSize: "6em" }}
|
||||
>
|
||||
schedule
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
@@ -145,7 +147,7 @@ export const ArtistAlbum = ({ user, album, boxProps }) => {
|
||||
>
|
||||
Name
|
||||
</Typography>
|
||||
<MdiClockOutline />
|
||||
<span className="material-symbols-rounded">schedule</span>
|
||||
</div>
|
||||
{albumTracks.data.Items.map((track, index) => {
|
||||
return (
|
||||
|
||||
@@ -5,7 +5,6 @@ import { useApi } from "../../utils/store/api";
|
||||
import { useAudioPlayback } from "../../utils/store/audioPlayback";
|
||||
import LikeButton from "../buttons/likeButton";
|
||||
import PlayButton from "../buttons/playButton";
|
||||
import { MdiMusic } from "../icons/mdiMusic";
|
||||
import TextLink from "../textLink";
|
||||
import "./musicTrack.module.scss";
|
||||
|
||||
@@ -41,12 +40,12 @@ const MusicTrack = ({
|
||||
<div className={`music-track ${className}`}>
|
||||
<div className="music-track-image">
|
||||
<div className="music-track-icon">
|
||||
<MdiMusic
|
||||
sx={{
|
||||
fontSize: "2em !important",
|
||||
fill: "url(#clr-gradient-default) !important",
|
||||
}}
|
||||
/>
|
||||
<span
|
||||
className="material-symbols-rounded"
|
||||
style={{ fontSize: "2em !important" }}
|
||||
>
|
||||
music_note
|
||||
</span>
|
||||
</div>
|
||||
<img
|
||||
alt={item.Name}
|
||||
|
||||
@@ -15,24 +15,15 @@ import WaveSurfer from "wavesurfer.js";
|
||||
import { useAudioPlayback } from "../../../utils/store/audioPlayback";
|
||||
|
||||
import { AnimatePresence } from "framer-motion";
|
||||
import { MdiPause } from "../../icons/mdiPause";
|
||||
import { MdiPlay } from "../../icons/mdiPlay";
|
||||
import "./audioPlayer.module.scss";
|
||||
|
||||
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { getRuntimeMusic, secToTicks } from "../../../utils/date/time";
|
||||
import { MdiClose } from "../../icons/mdiClose";
|
||||
import { MdiMusic } from "../../icons/mdiMusic";
|
||||
import { MdiSkipNext } from "../../icons/mdiSkipNext";
|
||||
import { MdiSkipPrevious } from "../../icons/mdiSkipPrevious";
|
||||
|
||||
import { getPlaystateApi } from "@jellyfin/sdk/lib/utils/api/playstate-api";
|
||||
import { theme } from "../../../theme";
|
||||
import { useApi } from "../../../utils/store/api";
|
||||
import { MdiPlaylistMusicOutline } from "../../icons/mdiPlaylistMusicOutline";
|
||||
import { MdiVolumeHigh } from "../../icons/mdiVolumeHigh";
|
||||
import { MdiVolumeOff } from "../../icons/mdiVolumeOff";
|
||||
import MusicTrack from "../../musicTrack";
|
||||
|
||||
const AudioPlayer = () => {
|
||||
@@ -245,7 +236,9 @@ const AudioPlayer = () => {
|
||||
},
|
||||
)}
|
||||
/>
|
||||
<MdiMusic className="audio-player-image-icon" />
|
||||
<span className="material-symbols-rounded audio-player-image-icon">
|
||||
music_note
|
||||
</span>
|
||||
</div>
|
||||
<div className="audio-player-info-text">
|
||||
<Typography
|
||||
|
||||
@@ -1,62 +1,5 @@
|
||||
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
||||
import React from "react";
|
||||
import { MdiAccount } from "../icons/mdiAccount";
|
||||
import { MdiAccountMusic } from "../icons/mdiAccountMusic";
|
||||
import { MdiAccountTie } from "../icons/mdiAccountTie";
|
||||
import { MdiAlbum } from "../icons/mdiAlbum";
|
||||
import { MdiBook } from "../icons/mdiBook";
|
||||
import { MdiBookMultiple } from "../icons/mdiBookMultiple";
|
||||
import { MdiBookMusic } from "../icons/mdiBookMusic";
|
||||
import { MdiDramaMasks } from "../icons/mdiDramaMasks";
|
||||
import { MdiFilmstrip } from "../icons/mdiFilmstrip";
|
||||
import { MdiFilmstripBoxMultiple } from "../icons/mdiFilmstripBoxMultiple";
|
||||
import { MdiFolderMultiple } from "../icons/mdiFolderMultiple";
|
||||
import { MdiFolderMusicOutline } from "../icons/mdiFolderMusicOutline";
|
||||
import { MdiFolderOutline } from "../icons/mdiFolderOutline";
|
||||
import { MdiImage } from "../icons/mdiImage";
|
||||
import { MdiImageMultiple } from "../icons/mdiImageMultiple";
|
||||
import { MdiMicrophone } from "../icons/mdiMicrophone";
|
||||
import { MdiMovieOutline } from "../icons/mdiMovieOutline";
|
||||
import { MdiMultimedia } from "../icons/mdiMultimedia";
|
||||
import { MdiMusic } from "../icons/mdiMusic";
|
||||
import { MdiMusicBoxMultipleOutline } from "../icons/mdiMusicBoxMultipleOutline";
|
||||
import { MdiPlayBoxMultiple } from "../icons/mdiPlayBoxMultiple";
|
||||
import { MdiPlaylistMusicOutline } from "../icons/mdiPlaylistMusicOutline";
|
||||
import { MdiTelevision } from "../icons/mdiTelevision";
|
||||
import { MdiTelevisionClassic } from "../icons/mdiTelevisionClassic";
|
||||
import { MdiYoutube } from "../icons/mdiYoutube";
|
||||
|
||||
export const MediaCollectionTypeIconCollection = {
|
||||
universal: <MdiMultimedia />,
|
||||
movies: <MdiMovieOutline />,
|
||||
music: <MdiMusicBoxMultipleOutline />,
|
||||
playlists: <MdiPlaylistMusicOutline />,
|
||||
tvshows: <MdiTelevision />,
|
||||
boxsets: <MdiFilmstripBoxMultiple />,
|
||||
musicvideos: <MdiFolderMusicOutline />,
|
||||
trailers: <MdiYoutube />,
|
||||
books: <MdiBookMultiple />,
|
||||
photos: <MdiImageMultiple />,
|
||||
livetv: <MdiTelevisionClassic />,
|
||||
folder: <MdiFolderOutline />,
|
||||
logout: <MdiFolderOutline />,
|
||||
};
|
||||
|
||||
export const MediaCollectionTypeIconCollectionCard = {
|
||||
photos: <MdiImageMultiple className="card-image-icon" />,
|
||||
livetv: <MdiTelevisionClassic className="card-image-icon" />,
|
||||
folder: <MdiFolderOutline className="card-image-icon" />,
|
||||
};
|
||||
|
||||
export const MediaTypeIconCollection = {
|
||||
Movie: <MdiFilmstrip className="hero-carousel-background-icon" />,
|
||||
Series: <MdiTelevision className="hero-carousel-background-icon" />,
|
||||
Audio: <MdiMicrophone className="hero-carousel-background-icon" />,
|
||||
Photo: <MdiImage className="hero-carousel-background-icon" />,
|
||||
Book: <MdiBook className="hero-carousel-background-icon" />,
|
||||
MusicAlbum: <MdiAlbum className="hero-carousel-background-icon" />,
|
||||
AudioBook: <MdiBookMusic className="hero-carousel-background-icon" />,
|
||||
};
|
||||
|
||||
export const getTypeIcon = (icon) => {
|
||||
switch (icon) {
|
||||
|
||||
Reference in new issue
Block a user