mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-09 15:05:26 +03:00
Compare commits
No commits in common. "463e93d36f9d85e575663a506efb33c259da5c75" and "ad1365a46d08964dc05e551f9d7049bfb7abb1a6" have entirely different histories.
463e93d36f
...
ad1365a46d
@ -15,7 +15,6 @@ import { AuthProvider } from "@/context/auth-context";
|
|||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
import { FrigateConfig } from "./types/frigateConfig";
|
import { FrigateConfig } from "./types/frigateConfig";
|
||||||
import ActivityIndicator from "@/components/indicators/activity-indicator";
|
import ActivityIndicator from "@/components/indicators/activity-indicator";
|
||||||
import { isRedirectingToLogin } from "@/api/auth-redirect";
|
|
||||||
|
|
||||||
const Live = lazy(() => import("@/pages/Live"));
|
const Live = lazy(() => import("@/pages/Live"));
|
||||||
const Events = lazy(() => import("@/pages/Events"));
|
const Events = lazy(() => import("@/pages/Events"));
|
||||||
@ -59,16 +58,6 @@ function DefaultAppView() {
|
|||||||
? Object.keys(config.auth.roles)
|
? Object.keys(config.auth.roles)
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
// Show loading indicator during redirect to prevent React from attempting to render
|
|
||||||
// lazy components, which would cause error #426 (suspension during synchronous navigation)
|
|
||||||
if (isRedirectingToLogin()) {
|
|
||||||
return (
|
|
||||||
<div className="size-full overflow-hidden">
|
|
||||||
<ActivityIndicator className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2" />
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="size-full overflow-hidden">
|
<div className="size-full overflow-hidden">
|
||||||
{isDesktop && <Sidebar />}
|
{isDesktop && <Sidebar />}
|
||||||
|
|||||||
@ -28,14 +28,6 @@ export default function ProtectedRoute({
|
|||||||
}
|
}
|
||||||
}, [auth.isLoading, auth.isAuthenticated, auth.user]);
|
}, [auth.isLoading, auth.isAuthenticated, auth.user]);
|
||||||
|
|
||||||
// Show loading indicator during redirect to prevent React from attempting to render
|
|
||||||
// lazy components, which would cause error #426 (suspension during synchronous navigation)
|
|
||||||
if (isRedirectingToLogin()) {
|
|
||||||
return (
|
|
||||||
<ActivityIndicator className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2" />
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (auth.isLoading) {
|
if (auth.isLoading) {
|
||||||
return (
|
return (
|
||||||
<ActivityIndicator className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2" />
|
<ActivityIndicator className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2" />
|
||||||
|
|||||||
@ -88,7 +88,7 @@ export default function ModelTrainingView({ model }: ModelTrainingViewProps) {
|
|||||||
// title
|
// title
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
document.title = `${model.name.toUpperCase()} - ${t("documentTitle")}`;
|
document.title = `${model.name} - ${t("documentTitle")}`;
|
||||||
}, [model.name, t]);
|
}, [model.name, t]);
|
||||||
|
|
||||||
// model state
|
// model state
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user