Add more details to Hero Carousel, Remove mdi-mui icons, Fix Few bugs
This commit is contained in:
34 files changed
+616
-118
No files matched your search
Generated
-16
@@ -23,7 +23,6 @@
|
|||||||
"framer-motion": "^10.2.4",
|
"framer-motion": "^10.2.4",
|
||||||
"localforage": "^1.10.0",
|
"localforage": "^1.10.0",
|
||||||
"match-sorter": "^6.3.1",
|
"match-sorter": "^6.3.1",
|
||||||
"mdi-material-ui": "^7.6.0",
|
|
||||||
"notistack": "^3.0.1",
|
"notistack": "^3.0.1",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-cookie": "^4.1.1",
|
"react-cookie": "^4.1.1",
|
||||||
@@ -2612,15 +2611,6 @@
|
|||||||
"remove-accents": "0.4.2"
|
"remove-accents": "0.4.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/mdi-material-ui": {
|
|
||||||
"version": "7.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/mdi-material-ui/-/mdi-material-ui-7.6.0.tgz",
|
|
||||||
"integrity": "sha512-daqyXS2tVPB9AulKee4LOwf6llx/eiA969HFx0rOGEC2Cgup/nAmHWnN7yYtndhXpvd2cXwov5kjw40HxjjjZg==",
|
|
||||||
"peerDependencies": {
|
|
||||||
"@mui/material": "^5.0.0 || ^5.0.0-rc.0",
|
|
||||||
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/mime-db": {
|
"node_modules/mime-db": {
|
||||||
"version": "1.52.0",
|
"version": "1.52.0",
|
||||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
||||||
@@ -4920,12 +4910,6 @@
|
|||||||
"remove-accents": "0.4.2"
|
"remove-accents": "0.4.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mdi-material-ui": {
|
|
||||||
"version": "7.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/mdi-material-ui/-/mdi-material-ui-7.6.0.tgz",
|
|
||||||
"integrity": "sha512-daqyXS2tVPB9AulKee4LOwf6llx/eiA969HFx0rOGEC2Cgup/nAmHWnN7yYtndhXpvd2cXwov5kjw40HxjjjZg==",
|
|
||||||
"requires": {}
|
|
||||||
},
|
|
||||||
"mime-db": {
|
"mime-db": {
|
||||||
"version": "1.52.0",
|
"version": "1.52.0",
|
||||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
||||||
|
|||||||
@@ -24,7 +24,6 @@
|
|||||||
"framer-motion": "^10.2.4",
|
"framer-motion": "^10.2.4",
|
||||||
"localforage": "^1.10.0",
|
"localforage": "^1.10.0",
|
||||||
"match-sorter": "^6.3.1",
|
"match-sorter": "^6.3.1",
|
||||||
"mdi-material-ui": "^7.6.0",
|
|
||||||
"notistack": "^3.0.1",
|
"notistack": "^3.0.1",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-cookie": "^4.1.1",
|
"react-cookie": "^4.1.1",
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import { relaunch } from "@tauri-apps/api/process";
|
|||||||
|
|
||||||
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||||
|
|
||||||
|
import { useQuery } from "@tanstack/react-query";
|
||||||
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
||||||
|
|
||||||
// Theming
|
// Theming
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import PropTypes from "prop-types";
|
|||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
import ButtonBase from "@mui/material/ButtonBase";
|
import ButtonBase from "@mui/material/ButtonBase";
|
||||||
|
|
||||||
import Account from "mdi-material-ui/Account";
|
import { MdiAccount } from "../icons/mdiAccount";
|
||||||
|
|
||||||
import "./avatar.module.scss";
|
import "./avatar.module.scss";
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ export const AvatarCard = ({ userName, userId, userImageAvailable }) => {
|
|||||||
<div className="card-image empty"></div>
|
<div className="card-image empty"></div>
|
||||||
)}
|
)}
|
||||||
<div className="card-image-icon-container">
|
<div className="card-image-icon-container">
|
||||||
<Account className="card-image-icon" />
|
<MdiAccount className="card-image-icon" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card-text-container">
|
<div className="card-text-container">
|
||||||
@@ -61,7 +61,7 @@ export const AvatarImage = ({ userId }) => {
|
|||||||
></div>
|
></div>
|
||||||
|
|
||||||
<div className="avatar-image-icon-container">
|
<div className="avatar-image-icon-container">
|
||||||
<Account className="avatar-image-icon" />
|
<MdiAccount className="avatar-image-icon" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import PropTypes from "prop-types";
|
|||||||
import Carousel from "react-multi-carousel";
|
import Carousel from "react-multi-carousel";
|
||||||
import "react-multi-carousel/lib/styles.css";
|
import "react-multi-carousel/lib/styles.css";
|
||||||
|
|
||||||
import ChevronLeft from "mdi-material-ui/ChevronLeft";
|
import { MdiChevronLeft } from "../icons/mdiChevronLeft";
|
||||||
import ChevronRight from "mdi-material-ui/ChevronRight";
|
import { MdiChevronRight } from "../icons/mdiChevronRight";
|
||||||
|
|
||||||
import { styled } from "@mui/material/styles";
|
import { styled } from "@mui/material/styles";
|
||||||
import Button from "@mui/material/Button";
|
import Button from "@mui/material/Button";
|
||||||
@@ -27,7 +27,7 @@ const SliderButtonRight = ({ onClick }) => {
|
|||||||
className="card-scroller-button right"
|
className="card-scroller-button right"
|
||||||
variant="text"
|
variant="text"
|
||||||
>
|
>
|
||||||
<ChevronRight />
|
<MdiChevronRight />
|
||||||
</CarouselButton>
|
</CarouselButton>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -39,7 +39,7 @@ const SliderButtonLeft = ({ onClick }) => {
|
|||||||
className="card-scroller-button left"
|
className="card-scroller-button left"
|
||||||
variant="text"
|
variant="text"
|
||||||
>
|
>
|
||||||
<ChevronLeft />
|
<MdiChevronLeft />
|
||||||
</CarouselButton>
|
</CarouselButton>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
import { MdiChevronLeft } from "./mdiChevronLeft";
|
||||||
|
/** @format */
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiAccount } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiAccount = () => {
|
||||||
|
return (
|
||||||
|
<SvgIcon>
|
||||||
|
<path d={mdiAccount}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiBook } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiBook = () => {
|
||||||
|
return (
|
||||||
|
<SvgIcon>
|
||||||
|
<path d={mdiBook}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiBookMultiple } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiBookMultiple = () => {
|
||||||
|
return (
|
||||||
|
<SvgIcon>
|
||||||
|
<path d={mdiBookMultiple}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
/** @format */
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiChevronLeft } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiChevronLeft = () => {
|
||||||
|
return (
|
||||||
|
<SvgIcon>
|
||||||
|
<path d={mdiChevronLeft}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiFilmstrip } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiFilmstrip = () => {
|
||||||
|
return (
|
||||||
|
<SvgIcon>
|
||||||
|
<path d={mdiFilmstrip}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiFolderMusicOutline } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiFolderMusicOutline = () => {
|
||||||
|
return (
|
||||||
|
<SvgIcon>
|
||||||
|
<path d={mdiFolderMusicOutline}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiFolderOutline } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiFolderOutline = () => {
|
||||||
|
return (
|
||||||
|
<SvgIcon>
|
||||||
|
<path d={mdiFolderOutline}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiImage } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiImage = () => {
|
||||||
|
return (
|
||||||
|
<SvgIcon>
|
||||||
|
<path d={mdiImage}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiImageMultiple } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiImageMultiple = () => {
|
||||||
|
return (
|
||||||
|
<SvgIcon>
|
||||||
|
<path d={mdiImageMultiple}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
/** @format */
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiLogoutVariant } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiLogoutVariant = () => {
|
||||||
|
return (
|
||||||
|
<SvgIcon>
|
||||||
|
<path d={mdiLogoutVariant}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
/** @format */
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiMenu } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiMenu = () => {
|
||||||
|
return (
|
||||||
|
<SvgIcon>
|
||||||
|
<path d={mdiMenu}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiMicrophone } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiMicrophone = () => {
|
||||||
|
return (
|
||||||
|
<SvgIcon>
|
||||||
|
<path d={mdiMicrophone}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiMovieOutline } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiMovieOutline = () => {
|
||||||
|
return (
|
||||||
|
<SvgIcon>
|
||||||
|
<path d={mdiMovieOutline}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiMultimedia } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiMultimedia = () => {
|
||||||
|
return (
|
||||||
|
<SvgIcon>
|
||||||
|
<path d={mdiMultimedia}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiMusicBoxMultipleOutline } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiMusicBoxMultipleOutline = () => {
|
||||||
|
return (
|
||||||
|
<SvgIcon>
|
||||||
|
<path d={mdiMusicBoxMultipleOutline}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
/** @format */
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiPlay } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiPlay = () => {
|
||||||
|
return (
|
||||||
|
<SvgIcon>
|
||||||
|
<path d={mdiPlay}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
/** @format */
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiPlayOutline } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiPlayOutline = () => {
|
||||||
|
return (
|
||||||
|
<SvgIcon>
|
||||||
|
<path d={mdiPlayOutline}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiPlaylistMusicOutline } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiPlaylistMusicOutline = () => {
|
||||||
|
return (
|
||||||
|
<SvgIcon>
|
||||||
|
<path d={mdiPlaylistMusicOutline}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
/** @format */
|
||||||
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiStarHalfFull } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiStarHalfFull = ({ colorA }) => {
|
||||||
|
return (
|
||||||
|
<SvgIcon sx={{ color: colorA }}>
|
||||||
|
<path d={mdiStarHalfFull}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
MdiStarHalfFull.propType = {
|
||||||
|
colorA: PropTypes.string,
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiTelevision } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiTelevision = () => {
|
||||||
|
return (
|
||||||
|
<SvgIcon>
|
||||||
|
<path d={mdiTelevision}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiTelevisionClassic } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiTelevisionClassic = () => {
|
||||||
|
return (
|
||||||
|
<SvgIcon>
|
||||||
|
<path d={mdiTelevisionClassic}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiYoutube } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiYoutube = () => {
|
||||||
|
return (
|
||||||
|
<SvgIcon>
|
||||||
|
<path d={mdiYoutube}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -4,10 +4,11 @@ import PropTypes from "prop-types";
|
|||||||
import { useQueryClient, useQuery, QueryClient } from "@tanstack/react-query";
|
import { useQueryClient, useQuery, QueryClient } from "@tanstack/react-query";
|
||||||
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
||||||
|
|
||||||
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
import { theme } from "../../theme";
|
import { theme } from "../../theme";
|
||||||
|
|
||||||
import { styled } from "@mui/material/styles";
|
import { styled } from "@mui/material/styles";
|
||||||
import MuiAppBar from "@mui/material/AppBar";
|
|
||||||
import Skeleton from "@mui/material/Skeleton";
|
import Skeleton from "@mui/material/Skeleton";
|
||||||
import Tooltip from "@mui/material/Tooltip";
|
import Tooltip from "@mui/material/Tooltip";
|
||||||
import List from "@mui/material/List";
|
import List from "@mui/material/List";
|
||||||
@@ -16,15 +17,15 @@ import ListItemText from "@mui/material/ListItemText";
|
|||||||
import ListItemIcon from "@mui/material/ListItemIcon";
|
import ListItemIcon from "@mui/material/ListItemIcon";
|
||||||
import ListItemButton from "@mui/material/ListItemButton";
|
import ListItemButton from "@mui/material/ListItemButton";
|
||||||
import IconButton from "@mui/material/IconButton";
|
import IconButton from "@mui/material/IconButton";
|
||||||
import Toolbar from "@mui/material/Toolbar";
|
|
||||||
import Divider from "@mui/material/Divider";
|
import Divider from "@mui/material/Divider";
|
||||||
import MuiDrawer from "@mui/material/Drawer";
|
import MuiDrawer from "@mui/material/Drawer";
|
||||||
|
|
||||||
import MenuIcon from "mdi-material-ui/Menu";
|
import { MdiMenu } from "../icons/mdiMenu";
|
||||||
|
import { MdiLogoutVariant } from "../icons/mdiLogoutVariant";
|
||||||
|
|
||||||
import { MediaCollectionTypeIconCollection } from "../../components/utils/iconsCollection.jsx";
|
import { MediaCollectionTypeIconCollection } from "../../components/utils/iconsCollection.jsx";
|
||||||
|
|
||||||
import { useSelector, shallowEqual } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
|
|
||||||
const drawerWidth = 320;
|
const drawerWidth = 320;
|
||||||
|
|
||||||
@@ -51,6 +52,7 @@ const MiniDrawer = styled(MuiDrawer, {
|
|||||||
export const SideMenu = ({}) => {
|
export const SideMenu = ({}) => {
|
||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
const visible = useSelector((state) => state.sidebar.visible);
|
const visible = useSelector((state) => state.sidebar.visible);
|
||||||
|
const navigate = useNavigate();
|
||||||
let libraries = useQuery({
|
let libraries = useQuery({
|
||||||
queryKey: ["sidemenu", "libraries"],
|
queryKey: ["sidemenu", "libraries"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
@@ -59,6 +61,13 @@ export const SideMenu = ({}) => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
const handleDrawerOpen = () => {};
|
const handleDrawerOpen = () => {};
|
||||||
|
|
||||||
|
const handleLogout = async () => {
|
||||||
|
await window.api.logout();
|
||||||
|
navigate("/login");
|
||||||
|
console.log("logged out user");
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MiniDrawer
|
<MiniDrawer
|
||||||
variant="permanent"
|
variant="permanent"
|
||||||
@@ -70,6 +79,7 @@ export const SideMenu = ({}) => {
|
|||||||
width: visible
|
width: visible
|
||||||
? `calc(${theme.spacing(7)} + 10px)`
|
? `calc(${theme.spacing(7)} + 10px)`
|
||||||
: 0,
|
: 0,
|
||||||
|
height: "100vh",
|
||||||
// display: visible ? "block" : "none",
|
// display: visible ? "block" : "none",
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
@@ -94,7 +104,7 @@ export const SideMenu = ({}) => {
|
|||||||
aria-label="open drawer"
|
aria-label="open drawer"
|
||||||
onClick={handleDrawerOpen}
|
onClick={handleDrawerOpen}
|
||||||
>
|
>
|
||||||
<MenuIcon />
|
<MdiMenu />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</DrawerHeader>
|
</DrawerHeader>
|
||||||
<Divider />
|
<Divider />
|
||||||
@@ -108,44 +118,75 @@ export const SideMenu = ({}) => {
|
|||||||
></Skeleton>
|
></Skeleton>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<List sx={{ border: "none" }}>
|
<>
|
||||||
{libraries.data.Items.map((library, index) => {
|
<List sx={{ border: "none" }}>
|
||||||
return (
|
{libraries.data.Items.map((library, index) => {
|
||||||
<Tooltip
|
return (
|
||||||
title={library.Name}
|
<Tooltip
|
||||||
placement="right"
|
title={library.Name}
|
||||||
arrow
|
placement="right"
|
||||||
followCursor
|
arrow
|
||||||
key={index}
|
followCursor
|
||||||
>
|
key={index}
|
||||||
<ListItem disablePadding>
|
>
|
||||||
<ListItemButton
|
<ListItem disablePadding>
|
||||||
sx={{
|
<ListItemButton
|
||||||
minHeight: 48,
|
|
||||||
justifyContent: "center",
|
|
||||||
px: 2.5,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<ListItemIcon
|
|
||||||
sx={{
|
sx={{
|
||||||
minWidth: 0,
|
minHeight: 48,
|
||||||
justifyContent:
|
justifyContent:
|
||||||
"center",
|
"center",
|
||||||
|
px: 2.5,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{
|
<ListItemIcon
|
||||||
MediaCollectionTypeIconCollection[
|
sx={{
|
||||||
library
|
minWidth: 0,
|
||||||
.CollectionType
|
justifyContent:
|
||||||
]
|
"center",
|
||||||
}
|
}}
|
||||||
</ListItemIcon>
|
>
|
||||||
</ListItemButton>
|
{
|
||||||
</ListItem>
|
MediaCollectionTypeIconCollection[
|
||||||
</Tooltip>
|
library
|
||||||
);
|
.CollectionType
|
||||||
})}
|
]
|
||||||
</List>
|
}
|
||||||
|
</ListItemIcon>
|
||||||
|
</ListItemButton>
|
||||||
|
</ListItem>
|
||||||
|
</Tooltip>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</List>
|
||||||
|
<List sx={{ marginTop: "auto" }}>
|
||||||
|
<Tooltip
|
||||||
|
title="Logout"
|
||||||
|
placement="right"
|
||||||
|
followCursor
|
||||||
|
arrow
|
||||||
|
>
|
||||||
|
<ListItem disablePadding>
|
||||||
|
<ListItemButton
|
||||||
|
sx={{
|
||||||
|
minHeight: 48,
|
||||||
|
justifyContent: "center",
|
||||||
|
px: 2.5,
|
||||||
|
}}
|
||||||
|
onClick={handleLogout}
|
||||||
|
>
|
||||||
|
<ListItemIcon
|
||||||
|
sx={{
|
||||||
|
minWidth: 0,
|
||||||
|
justifyContent: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<MdiLogoutVariant></MdiLogoutVariant>
|
||||||
|
</ListItemIcon>
|
||||||
|
</ListItemButton>
|
||||||
|
</ListItem>
|
||||||
|
</Tooltip>
|
||||||
|
</List>
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
</MiniDrawer>
|
</MiniDrawer>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,62 +1,62 @@
|
|||||||
/** @format */
|
/** @format */
|
||||||
|
|
||||||
import MovieOutline from "mdi-material-ui/MovieOutline";
|
import { MdiMovieOutline } from "../icons/mdiMovieOutline";
|
||||||
import MusicBoxMultipleOutline from "mdi-material-ui/MusicBoxMultipleOutline";
|
import { MdiMusicBoxMultipleOutline } from "../icons/mdiMusicBoxMultipleOutline";
|
||||||
import PlaylistMusicOutline from "mdi-material-ui/PlaylistMusicOutline";
|
import { MdiPlaylistMusicOutline } from "../icons/mdiPlaylistMusicOutline";
|
||||||
import Television from "mdi-material-ui/Television";
|
import { MdiTelevision } from "../icons/mdiTelevision";
|
||||||
import FolderOutline from "mdi-material-ui/FolderOutline";
|
import { MdiFolderOutline } from "../icons/mdiFolderOutline";
|
||||||
import FolderMusicOutline from "mdi-material-ui/FolderMusicOutline";
|
import { MdiFolderMusicOutline } from "../icons/mdiFolderMusicOutline";
|
||||||
import Youtube from "mdi-material-ui/Youtube";
|
import { MdiYoutube } from "../icons/mdiYoutube";
|
||||||
import MultiMedia from "mdi-material-ui/Multimedia";
|
import { MdiMultimedia } from "../icons/mdiMultiMedia";
|
||||||
import BookMultiple from "mdi-material-ui/BookMultiple";
|
import { MdiBookMultiple } from "../icons/mdiBookMultiple";
|
||||||
import ImageMultiple from "mdi-material-ui/ImageMultiple";
|
import { MdiImageMultiple } from "../icons/mdiImageMultiple";
|
||||||
import TelevisionClassic from "mdi-material-ui/TelevisionClassic";
|
import { MdiTelevisionClassic } from "../icons/mdiTelevisionClassic";
|
||||||
import Filmstrip from "mdi-material-ui/Filmstrip";
|
import { MdiFilmstrip } from "../icons/mdiFilmstrip";
|
||||||
import Microphone from "mdi-material-ui/Microphone";
|
import { MdiMicrophone } from "../icons/mdiMicrophone";
|
||||||
import Image from "mdi-material-ui/Image";
|
import { MdiImage } from "../icons/mdiImage";
|
||||||
import Book from "mdi-material-ui/Book";
|
import { MdiBook } from "../icons/mdiBook";
|
||||||
|
|
||||||
export const MediaCollectionTypeIconCollection = {
|
export const MediaCollectionTypeIconCollection = {
|
||||||
universal: <MultiMedia />,
|
universal: <MdiMultimedia />,
|
||||||
movies: <MovieOutline />,
|
movies: <MdiMovieOutline />,
|
||||||
music: <MusicBoxMultipleOutline />,
|
music: <MdiMusicBoxMultipleOutline />,
|
||||||
playlists: <PlaylistMusicOutline />,
|
playlists: <MdiPlaylistMusicOutline />,
|
||||||
tvshows: <Television />,
|
tvshows: <MdiTelevision />,
|
||||||
boxsets: <MovieOutline />,
|
boxsets: <MdiMovieOutline />,
|
||||||
musicvideos: <FolderMusicOutline />,
|
musicvideos: <MdiFolderMusicOutline />,
|
||||||
trailers: <Youtube />,
|
trailers: <MdiYoutube />,
|
||||||
books: <BookMultiple />,
|
books: <MdiBookMultiple />,
|
||||||
photos: <ImageMultiple />,
|
photos: <MdiImageMultiple />,
|
||||||
livetv: <TelevisionClassic />,
|
livetv: <MdiTelevisionClassic />,
|
||||||
folder: <FolderOutline />,
|
folder: <MdiFolderOutline />,
|
||||||
logout: <FolderOutline />,
|
logout: <MdiFolderOutline />,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const MediaCollectionTypeIconCollectionCard = {
|
export const MediaCollectionTypeIconCollectionCard = {
|
||||||
universal: <MultiMedia className="card-image-icon" />,
|
universal: <MdiMultimedia className="card-image-icon" />,
|
||||||
movies: <MovieOutline className="card-image-icon" />,
|
movies: <MdiMovieOutline className="card-image-icon" />,
|
||||||
music: <MusicBoxMultipleOutline className="card-image-icon" />,
|
music: <MdiMusicBoxMultipleOutline className="card-image-icon" />,
|
||||||
playlists: <PlaylistMusicOutline className="card-image-icon" />,
|
playlists: <MdiPlaylistMusicOutline className="card-image-icon" />,
|
||||||
tvshows: <Television className="card-image-icon" />,
|
tvshows: <MdiTelevision className="card-image-icon" />,
|
||||||
boxsets: <MovieOutline className="card-image-icon" />,
|
boxsets: <MdiMovieOutline className="card-image-icon" />,
|
||||||
musicvideos: <FolderMusicOutline className="card-image-icon" />,
|
musicvideos: <MdiFolderMusicOutline className="card-image-icon" />,
|
||||||
trailers: <Youtube className="card-image-icon" />,
|
trailers: <MdiYoutube className="card-image-icon" />,
|
||||||
books: <BookMultiple className="card-image-icon" />,
|
books: <MdiBookMultiple className="card-image-icon" />,
|
||||||
photos: <ImageMultiple className="card-image-icon" />,
|
photos: <MdiImageMultiple className="card-image-icon" />,
|
||||||
livetv: <TelevisionClassic className="card-image-icon" />,
|
livetv: <MdiTelevisionClassic className="card-image-icon" />,
|
||||||
folder: <FolderOutline className="card-image-icon" />,
|
folder: <MdiFolderOutline className="card-image-icon" />,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const MediaTypeIconCollection = {
|
export const MediaTypeIconCollection = {
|
||||||
Video: <Filmstrip className="hero-carousel-background-icon" />,
|
Video: <MdiFilmstrip className="hero-carousel-background-icon" />,
|
||||||
Audio: <Microphone className="hero-carousel-background-icon" />,
|
Audio: <MdiMicrophone className="hero-carousel-background-icon" />,
|
||||||
Photo: <Image className="hero-carousel-background-icon" />,
|
Photo: <MdiImage className="hero-carousel-background-icon" />,
|
||||||
Book: <Book className="hero-carousel-background-icon" />,
|
Book: <MdiBook className="hero-carousel-background-icon" />,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const MediaTypeIconCollectionCard = {
|
export const MediaTypeIconCollectionCard = {
|
||||||
Video: <Filmstrip className="card-image-icon" />,
|
Video: <MdiFilmstrip className="card-image-icon" />,
|
||||||
Audio: <Microphone className="card-image-icon" />,
|
Audio: <MdiMicrophone className="card-image-icon" />,
|
||||||
Photo: <Image className="card-image-icon" />,
|
Photo: <MdiImage className="card-image-icon" />,
|
||||||
Book: <Book className="card-image-icon" />,
|
Book: <MdiBook className="card-image-icon" />,
|
||||||
};
|
};
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
background-position: center;
|
||||||
}
|
}
|
||||||
&-icon {
|
&-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -63,6 +64,13 @@
|
|||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
-webkit-line-clamp: 2;
|
-webkit-line-clamp: 2;
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
&-logo {
|
||||||
|
max-width: 6em;
|
||||||
|
height: 2em;
|
||||||
|
object-fit: contain;
|
||||||
|
object-position: bottom;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
&-detail {
|
&-detail {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
+147
-8
@@ -16,7 +16,10 @@ import Skeleton from "@mui/material/Skeleton";
|
|||||||
import Button from "@mui/material/Button";
|
import Button from "@mui/material/Button";
|
||||||
import Paper from "@mui/material/Paper";
|
import Paper from "@mui/material/Paper";
|
||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
import useScrollTrigger from "@mui/material/useScrollTrigger";
|
import Chip from "@mui/material/Chip";
|
||||||
|
import Divider from "@mui/material/Divider";
|
||||||
|
|
||||||
|
import { yellow } from "@mui/material/colors";
|
||||||
|
|
||||||
import Carousel from "react-material-ui-carousel";
|
import Carousel from "react-material-ui-carousel";
|
||||||
|
|
||||||
@@ -24,11 +27,10 @@ import Carousel from "react-material-ui-carousel";
|
|||||||
import { CardLandscape, CardPotrait } from "../../components/card/card";
|
import { CardLandscape, CardPotrait } from "../../components/card/card";
|
||||||
import { CardScroller } from "../../components/cardScroller/cardScroller";
|
import { CardScroller } from "../../components/cardScroller/cardScroller";
|
||||||
// Icons
|
// Icons
|
||||||
import {
|
import { MediaTypeIconCollection } from "../../components/utils/iconsCollection.jsx";
|
||||||
MediaCollectionTypeIconCollection,
|
import { MdiStarHalfFull } from "../../components/icons/mdiStarHalfFull";
|
||||||
MediaTypeIconCollection,
|
import { MdiPlayOutline } from "../../components/icons/mdiPlayOutline";
|
||||||
} from "../../components/utils/iconsCollection.jsx";
|
import { MdiChevronRight } from "../../components/icons/mdiChevronRight";
|
||||||
import Close from "mdi-material-ui/Close";
|
|
||||||
|
|
||||||
import { useDispatch, useSelector } from "react-redux";
|
import { useDispatch, useSelector } from "react-redux";
|
||||||
import { showSidemenu } from "../../utils/slice/sidemenu";
|
import { showSidemenu } from "../../utils/slice/sidemenu";
|
||||||
@@ -39,6 +41,9 @@ import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api"
|
|||||||
import { getUserViewsApi } from "@jellyfin/sdk/lib/utils/api/user-views-api";
|
import { getUserViewsApi } from "@jellyfin/sdk/lib/utils/api/user-views-api";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
|
import { formateDate } from "../../utils/date/formateDate";
|
||||||
|
import { getRuntime } from "../../utils/date/time";
|
||||||
|
|
||||||
export const Home = () => {
|
export const Home = () => {
|
||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
|
|
||||||
@@ -56,6 +61,7 @@ export const Home = () => {
|
|||||||
event.emit("set-api-accessToken", window.api.basePath);
|
event.emit("set-api-accessToken", window.api.basePath);
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
enabled: !window.api,
|
||||||
});
|
});
|
||||||
|
|
||||||
const libraries = useQuery({
|
const libraries = useQuery({
|
||||||
@@ -86,7 +92,6 @@ export const Home = () => {
|
|||||||
enableUserData: true,
|
enableUserData: true,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
console.log(media);
|
|
||||||
return media.data;
|
return media.data;
|
||||||
},
|
},
|
||||||
enabled: !!user.data,
|
enabled: !!user.data,
|
||||||
@@ -311,15 +316,149 @@ export const Home = () => {
|
|||||||
<Typography
|
<Typography
|
||||||
variant="h3"
|
variant="h3"
|
||||||
className="hero-carousel-text"
|
className="hero-carousel-text"
|
||||||
|
sx={{ mb: 2.5 }}
|
||||||
>
|
>
|
||||||
{item.Name}
|
{!item.ImageTags
|
||||||
|
.Logo ? (
|
||||||
|
item.Name
|
||||||
|
) : (
|
||||||
|
<img
|
||||||
|
className="hero-carousel-text-logo"
|
||||||
|
src={
|
||||||
|
window
|
||||||
|
.api
|
||||||
|
.basePath +
|
||||||
|
"/Items/" +
|
||||||
|
item.Id +
|
||||||
|
"/Images/Logo?quality=80&tag=" +
|
||||||
|
item
|
||||||
|
.ImageTags
|
||||||
|
.Logo
|
||||||
|
}
|
||||||
|
></img>
|
||||||
|
)}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
display: "flex",
|
||||||
|
alignItems:
|
||||||
|
"center",
|
||||||
|
width: "fit-content",
|
||||||
|
gap: "1em",
|
||||||
|
mb: 1.5,
|
||||||
|
}}
|
||||||
|
className="hero-carousel-info"
|
||||||
|
>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle1"
|
||||||
|
// color="GrayText"
|
||||||
|
>
|
||||||
|
{formateDate(
|
||||||
|
item.PremiereDate,
|
||||||
|
)}
|
||||||
|
</Typography>
|
||||||
|
<Divider
|
||||||
|
variant="middle"
|
||||||
|
component="div"
|
||||||
|
orientation="vertical"
|
||||||
|
flexItem
|
||||||
|
/>
|
||||||
|
<Chip
|
||||||
|
variant="outlined"
|
||||||
|
label={
|
||||||
|
item.OfficialRating
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<Divider
|
||||||
|
variant="middle"
|
||||||
|
component="div"
|
||||||
|
orientation="vertical"
|
||||||
|
flexItem
|
||||||
|
/>
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
display: "flex",
|
||||||
|
gap: "0.25em",
|
||||||
|
alignItems:
|
||||||
|
"center",
|
||||||
|
}}
|
||||||
|
className="hero-carousel-info-rating"
|
||||||
|
>
|
||||||
|
<MdiStarHalfFull
|
||||||
|
colorA={
|
||||||
|
yellow[700]
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{Math.round(
|
||||||
|
item.CommunityRating *
|
||||||
|
10,
|
||||||
|
) / 10}
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
|
<Divider
|
||||||
|
variant="middle"
|
||||||
|
component="div"
|
||||||
|
orientation="vertical"
|
||||||
|
flexItem
|
||||||
|
/>
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{getRuntime(
|
||||||
|
item.RunTimeTicks,
|
||||||
|
)}
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
<Typography
|
<Typography
|
||||||
variant="subtitle1"
|
variant="subtitle1"
|
||||||
className="hero-carousel-text"
|
className="hero-carousel-text"
|
||||||
|
sx={{
|
||||||
|
display: "-webkit-box",
|
||||||
|
maxWidth:
|
||||||
|
"70%",
|
||||||
|
maxHeight:
|
||||||
|
"30%",
|
||||||
|
textOverflow:
|
||||||
|
"ellipsis",
|
||||||
|
overflow:
|
||||||
|
"hidden",
|
||||||
|
WebkitLineClamp:
|
||||||
|
"3",
|
||||||
|
WebkitBoxOrient:
|
||||||
|
"vertical",
|
||||||
|
opacity: 0.7,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{item.Overview}
|
{item.Overview}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
{/* TODO Link PLay and More info buttons in carousel */}
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
display: "flex",
|
||||||
|
gap: 3,
|
||||||
|
mt: 3,
|
||||||
|
}}
|
||||||
|
className="hero-carousel-button-container"
|
||||||
|
>
|
||||||
|
<Button
|
||||||
|
variant="contained"
|
||||||
|
endIcon={
|
||||||
|
<MdiPlayOutline />
|
||||||
|
}
|
||||||
|
disabled
|
||||||
|
>
|
||||||
|
Play
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
color="white"
|
||||||
|
variant="outlined"
|
||||||
|
endIcon={
|
||||||
|
<MdiChevronRight />
|
||||||
|
}
|
||||||
|
disabled
|
||||||
|
>
|
||||||
|
More info
|
||||||
|
</Button>
|
||||||
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
</Paper>
|
</Paper>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -26,6 +26,9 @@ export const theme = createTheme({
|
|||||||
default: clrBackgroundDefault,
|
default: clrBackgroundDefault,
|
||||||
paper: clrBackgroundDark,
|
paper: clrBackgroundDark,
|
||||||
},
|
},
|
||||||
|
white: {
|
||||||
|
main: "#ffffff",
|
||||||
|
},
|
||||||
mode: "dark",
|
mode: "dark",
|
||||||
},
|
},
|
||||||
typography: {
|
typography: {
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
/**
|
||||||
|
* @format
|
||||||
|
* @param {string} date - Date from server
|
||||||
|
* @returns {string} Formated Date
|
||||||
|
*/
|
||||||
|
|
||||||
|
export const formateDate = (date) => {
|
||||||
|
date = new Date(date);
|
||||||
|
date = new Intl.DateTimeFormat().format(date);
|
||||||
|
return date;
|
||||||
|
};
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
/**
|
||||||
|
* @format
|
||||||
|
* @param {number} ticks - C# ticks of a particular item
|
||||||
|
* @return {number} Converted ticks to Milliseconds
|
||||||
|
*/
|
||||||
|
|
||||||
|
const ticksToMs = (ticks) => {
|
||||||
|
return Math.round(ticks / 10000);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getRuntime = (ticks) => {
|
||||||
|
let time = ticksToMs(ticks);
|
||||||
|
let formatedTime = "";
|
||||||
|
let timeSec = Math.round(time / 1000);
|
||||||
|
let timeMin = Math.round(timeSec / 60);
|
||||||
|
if (timeMin > 60) {
|
||||||
|
let timeHr = Math.floor(timeMin / 60);
|
||||||
|
timeMin -= timeHr * 60;
|
||||||
|
formatedTime = `${timeHr}hr ${timeMin}min`;
|
||||||
|
} else {
|
||||||
|
formatedTime = `${timeMin}min`;
|
||||||
|
}
|
||||||
|
return formatedTime;
|
||||||
|
};
|
||||||
Reference in new issue
Block a user