diff --git a/src/App.jsx b/src/App.jsx
index 19f0a35..7179277 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -101,6 +101,8 @@ import { CircularProgress } from "@mui/material";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import { useCentralStore } from "./utils/store/central.js";
import { useSnackbar } from "notistack";
+import { ErrorBoundary } from "react-error-boundary";
+import { ErrorNotice } from "./components/notices/errorNotice/errorNotice.jsx";
const anim = {
initial: {
@@ -457,148 +459,163 @@ function App() {
-
- {/*
+
+ {/* }
> */}
- }
- // element={<>>}
- />
-
-
- Unable to reach server
-
-
-
- Unable to connect to
- the jellyfin server.
-
-
-
-
-
-
-
- }
- />
- }
- />
+
+ }
+ // element={<>>}
+ />
+
+
+ Unable to reach
+ server
+
+
+
+ Unable to
+ connect to the
+ jellyfin
+ server.
+
+
+
+
+
+
+
+ }
+ />
+ }
+ />
- } />
- }
- />
- }
- />
- }
- />
- }
- />
- }
- />
- }
- />
- }
- />
- }
- />
- }
- />
- }
- />
- }
- />
- }
- />
- }
- />
- }
- />
- }
- />
- }
- />
- }
- />
- } />
- }
- />
- {/* */}
-
+ }
+ />
+ }
+ />
+ }
+ />
+ }
+ />
+ }
+ />
+ }
+ />
+ }
+ />
+ }
+ />
+ }
+ errorElement={Error
}
+ />
+ }
+ />
+ }
+ />
+ }
+ />
+ }
+ />
+ }
+ />
+ }
+ />
+ }
+ />
+ }
+ />
+ }
+ />
+ }
+ />
+ }
+ />
+ {/* */}
+
+
diff --git a/src/components/buttons/likeButton.jsx b/src/components/buttons/likeButton.jsx
index 9767d9d..36913ba 100644
--- a/src/components/buttons/likeButton.jsx
+++ b/src/components/buttons/likeButton.jsx
@@ -75,6 +75,7 @@ const LikeButton = ({
opacity: mutation.isPending ? 1 : 0,
transition: "opacity 200ms",
}}
+ thickness={2}
/>
{
diff --git a/src/components/buttons/markPlayedButton.jsx b/src/components/buttons/markPlayedButton.jsx
index 7d7fdaf..f51a279 100644
--- a/src/components/buttons/markPlayedButton.jsx
+++ b/src/components/buttons/markPlayedButton.jsx
@@ -67,6 +67,7 @@ const MarkPlayedButton = ({ itemId, isPlayed, queryKey, userId, itemName }) => {
opacity: mutation.isPending ? 1 : 0,
transition: "opacity 200ms",
}}
+ thickness={2}
/>
{
diff --git a/src/components/errorBoundary/index.jsx b/src/components/errorBoundary/index.jsx
index ecf25f6..379d345 100644
--- a/src/components/errorBoundary/index.jsx
+++ b/src/components/errorBoundary/index.jsx
@@ -17,6 +17,7 @@ class ErrorBoundary extends React.Component {
// in ErrorBoundary (created by App)
// in div (created by App)
// in App
+ this.setState;
console.error(`Err in ${info} - ${error}`);
}
diff --git a/src/components/layouts/item/hero.jsx b/src/components/layouts/item/hero.jsx
index 092b891..175bf95 100644
--- a/src/components/layouts/item/hero.jsx
+++ b/src/components/layouts/item/hero.jsx
@@ -327,7 +327,7 @@ const Hero = ({
}}
/>
)}
- {!!videoTracks[0].VideoRangeType && (
+ {!!videoTracks[0]?.VideoRangeType && (
{
+export const ErrorNotice = ({ error, resetErrorBoundary }) => {
+ console.error(error);
return (
{
justifyContent: "center",
alignItems: "center",
flexFlow: "column",
- opacity: 0.2,
+ // opacity: 0.2,
}}
>
-
- Something went wrong
+
+ error
+
+
+ Something went wrong
+
+
+ {error.message}
+
+
);
};
diff --git a/src/styles/global.scss b/src/styles/global.scss
index d44a0f5..cebc225 100644
--- a/src/styles/global.scss
+++ b/src/styles/global.scss
@@ -168,3 +168,38 @@ h1 {
.MuiListItemIcon-root {
font-size: 24px;
}
+
+.animate-icon {
+ position: relative;
+ &::after {
+ content: "";
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%) scale(1);
+ width: 100%;
+ height: 100%;
+ border-radius: 100%;
+ opacity: 0;
+
+ filter: blur(10px);
+ animation: iconAnimation cubic-bezier(0.175, 0.885, 0.32, 1.275) 3s
+ infinite;
+ background: rgb(255 0 0 / 0.1);
+ }
+}
+
+@keyframes iconAnimation {
+ 0% {
+ opacity: 0;
+ transform: translate(-50%, -50%) scale(1);
+ }
+ 60% {
+ opacity: 1;
+ transform: translate(-50%, -50%) scale(4);
+ }
+ 100% {
+ opacity: 0;
+ transform: translate(-50%, -50%) scale(4);
+ }
+}