Update deps and code cleanup
This commit is contained in:
9 files changed
+540
-741
No files matched your search
+17
-17
@@ -13,21 +13,21 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/react": "^11.11.1",
|
"@emotion/react": "^11.11.1",
|
||||||
"@emotion/styled": "^11.11.0",
|
"@emotion/styled": "^11.11.0",
|
||||||
"@fontsource-variable/jetbrains-mono": "^5.0.18",
|
"@fontsource-variable/jetbrains-mono": "^5.0.19",
|
||||||
"@fontsource/noto-sans": "^5.0.17",
|
"@fontsource/noto-sans": "^5.0.18",
|
||||||
"@jellyfin/sdk": "0.8.2",
|
"@jellyfin/sdk": "0.8.2",
|
||||||
"@mdi/js": "^7.3.67",
|
"@mdi/js": "^7.3.67",
|
||||||
"@mui/lab": "5.0.0-alpha.155",
|
"@mui/lab": "5.0.0-alpha.155",
|
||||||
"@mui/material": "^5.14.15",
|
"@mui/material": "^5.14.20",
|
||||||
"@tanstack/react-query": "^5.0.5",
|
"@tanstack/react-query": "^5.13.4",
|
||||||
"@tanstack/react-query-devtools": "^5.4.2",
|
"@tanstack/react-query-devtools": "^5.13.5",
|
||||||
"@tauri-apps/api": "^1.5.1",
|
"@tauri-apps/api": "^1.5.1",
|
||||||
"axios": "^1.6.0",
|
"axios": "^1.6.2",
|
||||||
"axios-tauri-api-adapter": "^0.2.0",
|
"axios-tauri-api-adapter": "^0.2.0",
|
||||||
"blurhash": "^2.0.5",
|
"blurhash": "^2.0.5",
|
||||||
"events": "^3.3.0",
|
"events": "^3.3.0",
|
||||||
"framer-motion": "^10.16.4",
|
"framer-motion": "^10.16.16",
|
||||||
"material-symbols": "^0.14.0",
|
"material-symbols": "^0.14.2",
|
||||||
"notistack": "^3.0.1",
|
"notistack": "^3.0.1",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-blurhash": "^0.3.0",
|
"react-blurhash": "^0.3.0",
|
||||||
@@ -35,24 +35,24 @@
|
|||||||
"react-error-boundary": "^4.0.11",
|
"react-error-boundary": "^4.0.11",
|
||||||
"react-multi-carousel": "^2.8.4",
|
"react-multi-carousel": "^2.8.4",
|
||||||
"react-player": "^2.13.0",
|
"react-player": "^2.13.0",
|
||||||
"react-router-dom": "^6.17.0",
|
"react-router-dom": "^6.20.1",
|
||||||
"react-use-konami": "^1.1.0",
|
"react-use-konami": "^1.1.0",
|
||||||
"tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log#v1",
|
"tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log#v1",
|
||||||
"tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store",
|
"tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store",
|
||||||
"uuid": "^9.0.1",
|
"uuid": "^9.0.1",
|
||||||
"vite-plugin-svgr": "^4.1.0",
|
"vite-plugin-svgr": "^4.2.0",
|
||||||
"wavesurfer.js": "^7.4.2",
|
"wavesurfer.js": "^7.5.1",
|
||||||
"zustand": "^4.4.4"
|
"zustand": "^4.4.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tauri-apps/cli": "^1.5.6",
|
"@tauri-apps/cli": "^1.5.7",
|
||||||
"@vitejs/plugin-react": "^4.1.0",
|
"@vitejs/plugin-react": "^4.2.1",
|
||||||
"eslint": "^8.52.0",
|
"eslint": "^8.55.0",
|
||||||
"eslint-plugin-react": "^7.33.2",
|
"eslint-plugin-react": "^7.33.2",
|
||||||
"eslint-plugin-react-refresh": "^0.4.3",
|
"eslint-plugin-react-refresh": "^0.4.5",
|
||||||
"prop-types": "^15.8.1",
|
"prop-types": "^15.8.1",
|
||||||
"sass": "^1.69.5",
|
"sass": "^1.69.5",
|
||||||
"vite": "^5.0.5",
|
"vite": "^5.0.7",
|
||||||
"vite-plugin-compression": "^0.5.1"
|
"vite-plugin-compression": "^0.5.1"
|
||||||
},
|
},
|
||||||
"license": "GPL-3.0-only"
|
"license": "GPL-3.0-only"
|
||||||
|
|||||||
Generated
+477
-646
File diff suppressed because it is too large.
Load diff
+11
-23
@@ -243,7 +243,7 @@ function App() {
|
|||||||
setUpdateDialog(true);
|
setUpdateDialog(true);
|
||||||
// You could show a dialog asking the user if they want to install the update here.
|
// You could show a dialog asking the user if they want to install the update here.
|
||||||
console.log(
|
console.log(
|
||||||
`Installing update ${manifest?.version}, ${manifest?.date}, ${manifest?.body}`,
|
`Update found : ${manifest?.version}, ${manifest?.date}`,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Install the update. This will also restart the app on Windows!
|
// Install the update. This will also restart the app on Windows!
|
||||||
@@ -458,16 +458,14 @@ function App() {
|
|||||||
<AppBar />
|
<AppBar />
|
||||||
<AudioPlayer key={audioPlayerVisible} />
|
<AudioPlayer key={audioPlayerVisible} />
|
||||||
<Routes location={location}>
|
<Routes location={location}>
|
||||||
<Route
|
{/* <Route
|
||||||
// key={location.key}
|
// key={location.key}
|
||||||
element={<AnimationWrapper />}
|
element={<AnimationWrapper />}
|
||||||
>
|
> */}
|
||||||
<Route
|
<Route
|
||||||
path="/"
|
path="/"
|
||||||
exact
|
exact
|
||||||
element={
|
element={<Navigate to={initialRoute} />}
|
||||||
<Navigate to={initialRoute} />
|
|
||||||
}
|
|
||||||
// element={<></>}
|
// element={<></>}
|
||||||
/>
|
/>
|
||||||
<Route
|
<Route
|
||||||
@@ -481,15 +479,12 @@ function App() {
|
|||||||
maxWidth="md"
|
maxWidth="md"
|
||||||
>
|
>
|
||||||
<DialogTitle id="alert-dialog-text">
|
<DialogTitle id="alert-dialog-text">
|
||||||
Unable to reach
|
Unable to reach server
|
||||||
server
|
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<DialogContentText id="alert-dialog-desc">
|
<DialogContentText id="alert-dialog-desc">
|
||||||
Unable to
|
Unable to connect to
|
||||||
connect to the
|
the jellyfin server.
|
||||||
jellyfin
|
|
||||||
server.
|
|
||||||
</DialogContentText>
|
</DialogContentText>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
@@ -508,8 +503,7 @@ function App() {
|
|||||||
handleRelaunch
|
handleRelaunch
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
Restart
|
Restart JellyPlayer
|
||||||
JellyPlayer
|
|
||||||
</Button>
|
</Button>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
@@ -521,10 +515,7 @@ function App() {
|
|||||||
element={<LoginRoute />}
|
element={<LoginRoute />}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Route
|
<Route path="/home" element={<Home />} />
|
||||||
path="/home"
|
|
||||||
element={<Home />}
|
|
||||||
/>
|
|
||||||
<Route
|
<Route
|
||||||
path="/setup/server"
|
path="/setup/server"
|
||||||
element={<ServerSetup />}
|
element={<ServerSetup />}
|
||||||
@@ -601,15 +592,12 @@ function App() {
|
|||||||
path="/settings"
|
path="/settings"
|
||||||
element={<Settings />}
|
element={<Settings />}
|
||||||
/>
|
/>
|
||||||
<Route
|
<Route path="/about" element={<About />} />
|
||||||
path="/about"
|
|
||||||
element={<About />}
|
|
||||||
/>
|
|
||||||
<Route
|
<Route
|
||||||
path="/player"
|
path="/player"
|
||||||
element={<VideoPlayer />}
|
element={<VideoPlayer />}
|
||||||
/>
|
/>
|
||||||
</Route>
|
{/* </Route> */}
|
||||||
</Routes>
|
</Routes>
|
||||||
</div>
|
</div>
|
||||||
<ReactQueryDevtools buttonPosition="bottom-left" />
|
<ReactQueryDevtools buttonPosition="bottom-left" />
|
||||||
|
|||||||
@@ -3,22 +3,18 @@ import React from "react";
|
|||||||
|
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
import MuiCard from "@mui/material/Card";
|
|
||||||
import CardActionArea from "@mui/material/CardActionArea";
|
|
||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
import LinearProgress from "@mui/material/LinearProgress";
|
import LinearProgress from "@mui/material/LinearProgress";
|
||||||
|
|
||||||
import { Blurhash } from "react-blurhash";
|
|
||||||
|
|
||||||
import { getTypeIcon } from "../utils/iconsCollection";
|
import { getTypeIcon } from "../utils/iconsCollection";
|
||||||
import "./card.module.scss";
|
import "./card.module.scss";
|
||||||
import { MdiCheck } from "../icons/mdiCheck";
|
|
||||||
|
|
||||||
import LikeButton from "../buttons/likeButton";
|
import LikeButton from "../buttons/likeButton";
|
||||||
import MarkPlayedButton from "../buttons/markPlayedButton";
|
import MarkPlayedButton from "../buttons/markPlayedButton";
|
||||||
import PlayButton from "../buttons/playButton";
|
import PlayButton from "../buttons/playButton";
|
||||||
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
||||||
import { useApi } from "../../utils/store/api";
|
import { useApi } from "../../utils/store/api";
|
||||||
|
import ErrorBoundary from "../errorBoundary";
|
||||||
|
|
||||||
const cardImageAspectRatios = {
|
const cardImageAspectRatios = {
|
||||||
thumb: 1.777,
|
thumb: 1.777,
|
||||||
@@ -63,7 +59,6 @@ export const Card = ({
|
|||||||
cardTitle,
|
cardTitle,
|
||||||
cardCaption,
|
cardCaption,
|
||||||
imageType = "Primary",
|
imageType = "Primary",
|
||||||
imageBlurhash,
|
|
||||||
cardType,
|
cardType,
|
||||||
queryKey,
|
queryKey,
|
||||||
userId,
|
userId,
|
||||||
@@ -71,7 +66,6 @@ export const Card = ({
|
|||||||
hideText,
|
hideText,
|
||||||
onClick,
|
onClick,
|
||||||
disableOverlay = false,
|
disableOverlay = false,
|
||||||
disablePadding,
|
|
||||||
overrideIcon,
|
overrideIcon,
|
||||||
}) => {
|
}) => {
|
||||||
const [api] = useApi((state) => [state.api]);
|
const [api] = useApi((state) => [state.api]);
|
||||||
@@ -94,21 +88,17 @@ export const Card = ({
|
|||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
onClick={onClick ? onClick : defaultOnClick}
|
onClick={onClick ? onClick : defaultOnClick}
|
||||||
>
|
>
|
||||||
<div className="card-box">
|
|
||||||
<div
|
<div
|
||||||
className="card-image-container"
|
className="card-image-container"
|
||||||
style={{
|
style={{
|
||||||
aspectRatio: cardImageAspectRatios[cardType],
|
aspectRatio: cardImageAspectRatios[cardType],
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{!!item.UserData && (
|
<ErrorBoundary fallback={<></>}>
|
||||||
<>
|
|
||||||
<div
|
<div
|
||||||
className="card-indicator check"
|
className="card-indicator check"
|
||||||
style={{
|
style={{
|
||||||
opacity: item.UserData?.Played
|
opacity: item.UserData?.Played ? 1 : 0,
|
||||||
? 1
|
|
||||||
: 0,
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="material-symbols-rounded">
|
<div className="material-symbols-rounded">
|
||||||
@@ -118,8 +108,7 @@ export const Card = ({
|
|||||||
<div
|
<div
|
||||||
className={`card-indicator text`}
|
className={`card-indicator text`}
|
||||||
style={{
|
style={{
|
||||||
opacity: item.UserData
|
opacity: item.UserData?.UnplayedItemCount
|
||||||
?.UnplayedItemCount
|
|
||||||
? 1
|
? 1
|
||||||
: 0,
|
: 0,
|
||||||
}}
|
}}
|
||||||
@@ -132,8 +121,7 @@ export const Card = ({
|
|||||||
{item.UserData?.UnplayedItemCount}
|
{item.UserData?.UnplayedItemCount}
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</ErrorBoundary>
|
||||||
)}
|
|
||||||
{/* {!!imageBlurhash && (
|
{/* {!!imageBlurhash && (
|
||||||
<Blurhash
|
<Blurhash
|
||||||
hash={imageBlurhash}
|
hash={imageBlurhash}
|
||||||
@@ -161,9 +149,14 @@ export const Card = ({
|
|||||||
: item.Id,
|
: item.Id,
|
||||||
imageType,
|
imageType,
|
||||||
{
|
{
|
||||||
quality: 85,
|
quality: 90,
|
||||||
fillHeight: 462,
|
fillHeight: 226,
|
||||||
fillWidth: 462,
|
fillWidth: Math.floor(
|
||||||
|
226 /
|
||||||
|
cardImageAspectRatios[
|
||||||
|
cardType
|
||||||
|
],
|
||||||
|
),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -176,8 +169,9 @@ export const Card = ({
|
|||||||
onLoad={(e) => (e.target.style.opacity = 1)}
|
onLoad={(e) => (e.target.style.opacity = 1)}
|
||||||
className="card-image"
|
className="card-image"
|
||||||
/>
|
/>
|
||||||
{!disableOverlay && (
|
|
||||||
<div className="card-overlay">
|
<div className="card-overlay">
|
||||||
|
{!disableOverlay && (
|
||||||
|
<>
|
||||||
<PlayButton
|
<PlayButton
|
||||||
itemId={item.Id}
|
itemId={item.Id}
|
||||||
userId={userId}
|
userId={userId}
|
||||||
@@ -217,8 +211,9 @@ export const Card = ({
|
|||||||
queryKey={queryKey}
|
queryKey={queryKey}
|
||||||
userId={userId}
|
userId={userId}
|
||||||
/>
|
/>
|
||||||
</div>
|
</>
|
||||||
)}
|
)}
|
||||||
|
</div>
|
||||||
{item.UserData?.PlaybackPositionTicks > 0 && (
|
{item.UserData?.PlaybackPositionTicks > 0 && (
|
||||||
<LinearProgress
|
<LinearProgress
|
||||||
variant="determinate"
|
variant="determinate"
|
||||||
@@ -230,8 +225,7 @@ export const Card = ({
|
|||||||
bottom: 0,
|
bottom: 0,
|
||||||
zIndex: 2,
|
zIndex: 2,
|
||||||
height: "6px",
|
height: "6px",
|
||||||
background:
|
background: "rgb(5 5 5 / 0.5) !important",
|
||||||
"rgb(5 5 5 / 0.5) !important",
|
|
||||||
backdropFilter: "blur(5px)",
|
backdropFilter: "blur(5px)",
|
||||||
}}
|
}}
|
||||||
color="primary"
|
color="primary"
|
||||||
@@ -262,6 +256,5 @@ export const Card = ({
|
|||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -61,7 +61,6 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
height: 100% !important;
|
height: 100% !important;
|
||||||
border-radius: 8px;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -78,17 +77,11 @@
|
|||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
padding: 0.5em;
|
padding: 0.5em;
|
||||||
border-radius: 8px;
|
background: rgb(0 0 0 / 0.4);
|
||||||
}
|
}
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus,
|
&:focus,
|
||||||
&:focus-within {
|
&:focus-within {
|
||||||
.card-image {
|
|
||||||
filter: brightness(0.6);
|
|
||||||
}
|
|
||||||
.card-image-icon-container {
|
|
||||||
filter: brightness(0.6);
|
|
||||||
}
|
|
||||||
.card-overlay {
|
.card-overlay {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,26 +11,18 @@ $maskPercentage: 40%;
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
&-backdrop {
|
&-backdrop {
|
||||||
position: fixed;
|
position: absolute;
|
||||||
background-attachment: fixed;
|
background-attachment: scroll;
|
||||||
width: 100%;
|
width: calc(100vw + 100px);
|
||||||
height: 100vh;
|
height: calc(100vh + 100px);
|
||||||
top: 0;
|
top: -50px;
|
||||||
left: 0;
|
left: -50px;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
filter: brightness(0.4);
|
filter: brightness(0.4);
|
||||||
mask-image: linear-gradient(
|
mask-image: linear-gradient(to bottom, black 40%, transparent),
|
||||||
to bottom,
|
linear-gradient(to left, black 40%, transparent);
|
||||||
black $maskPercentage,
|
-webkit-mask-image: linear-gradient(to bottom, black 40%, transparent),
|
||||||
transparent
|
linear-gradient(to left, black 40%, transparent);
|
||||||
),
|
|
||||||
linear-gradient(to left, black $maskPercentage, transparent);
|
|
||||||
-webkit-mask-image: linear-gradient(
|
|
||||||
to bottom,
|
|
||||||
black $maskPercentage,
|
|
||||||
transparent
|
|
||||||
),
|
|
||||||
linear-gradient(to left, black $maskPercentage, transparent);
|
|
||||||
mask-composite: source-in;
|
mask-composite: source-in;
|
||||||
-webkit-mask-composite: source-in;
|
-webkit-mask-composite: source-in;
|
||||||
& > * {
|
& > * {
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import ErrorBoundary from "../../components/errorBoundary";
|
|||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
import CarouselSlideError from "../../components/errors/carousel";
|
import CarouselSlideError from "../../components/errors/carousel";
|
||||||
import { useApi } from "../../utils/store/api";
|
import { useApi } from "../../utils/store/api";
|
||||||
|
import { useSnackbar } from "notistack";
|
||||||
|
|
||||||
const Home = () => {
|
const Home = () => {
|
||||||
const [api] = useApi((state) => [state.api]);
|
const [api] = useApi((state) => [state.api]);
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ const SeriesTitlePage = () => {
|
|||||||
const result = await getTvShowsApi(api).getSeasons({
|
const result = await getTvShowsApi(api).getSeasons({
|
||||||
userId: user.data.Id,
|
userId: user.data.Id,
|
||||||
seriesId: item.data.Id,
|
seriesId: item.data.Id,
|
||||||
isSpecialSeason: false,
|
// isSpecialSeason: false,
|
||||||
});
|
});
|
||||||
return result.data;
|
return result.data;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -47,9 +47,9 @@ body {
|
|||||||
width: calc(100% + 100px);
|
width: calc(100% + 100px);
|
||||||
height: calc(100% + 100px);
|
height: calc(100% + 100px);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -100px;
|
top: -50px;
|
||||||
left: -100px;
|
left: -50px;
|
||||||
z-index: -1;
|
z-index: -2;
|
||||||
filter: blur(120px) saturate(130%) contrast(140%);
|
filter: blur(120px) saturate(130%) contrast(140%);
|
||||||
&-container {
|
&-container {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -57,6 +57,7 @@ body {
|
|||||||
height: 100vh;
|
height: 100vh;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
z-index: -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user