diff --git a/frigate/api/review.py b/frigate/api/review.py
index 5d317c1cf..2ad36962e 100644
--- a/frigate/api/review.py
+++ b/frigate/api/review.py
@@ -439,7 +439,7 @@ def motion_activity():
# normalize data
motion = (
df["motion"]
- .resample(f"{scale}S")
+ .resample(f"{scale}s")
.apply(lambda x: max(x, key=abs, default=0.0))
.fillna(0.0)
.to_frame()
diff --git a/web/src/components/filter/ReviewFilterGroup.tsx b/web/src/components/filter/ReviewFilterGroup.tsx
index 036f30a36..2038aef42 100644
--- a/web/src/components/filter/ReviewFilterGroup.tsx
+++ b/web/src/components/filter/ReviewFilterGroup.tsx
@@ -693,7 +693,9 @@ function ShowMotionOnlyButton({
variant={motionOnlyButton ? "select" : "default"}
onClick={() => setMotionOnlyButton(!motionOnlyButton)}
>
-
+
>
diff --git a/web/src/components/navigation/Bottombar.tsx b/web/src/components/navigation/Bottombar.tsx
index 6334b04b0..2ef8c2e8d 100644
--- a/web/src/components/navigation/Bottombar.tsx
+++ b/web/src/components/navigation/Bottombar.tsx
@@ -1,4 +1,3 @@
-import { navbarLinks } from "@/pages/site-navigation";
import NavItem from "./NavItem";
import { IoIosWarning } from "react-icons/io";
import { Drawer, DrawerContent, DrawerTrigger } from "../ui/drawer";
@@ -9,20 +8,15 @@ import { useMemo } from "react";
import useStats from "@/hooks/use-stats";
import GeneralSettings from "../settings/GeneralSettings";
import AccountSettings from "../settings/AccountSettings";
+import useNavigation from "@/hooks/use-navigation";
function Bottombar() {
+ const navItems = useNavigation("secondary");
+
return (
- {navbarLinks.map((item) => (
-
+ {navItems.map((item) => (
+
))}
diff --git a/web/src/components/navigation/NavItem.tsx b/web/src/components/navigation/NavItem.tsx
index 1b42e5f7b..6b8295be9 100644
--- a/web/src/components/navigation/NavItem.tsx
+++ b/web/src/components/navigation/NavItem.tsx
@@ -1,6 +1,4 @@
-import { IconType } from "react-icons";
import { NavLink } from "react-router-dom";
-import { ENV } from "@/env";
import {
Tooltip,
TooltipContent,
@@ -8,6 +6,8 @@ import {
} from "@/components/ui/tooltip";
import { isDesktop } from "react-device-detect";
import { TooltipPortal } from "@radix-ui/react-tooltip";
+import { NavData } from "@/types/navigation";
+import { IconType } from "react-icons";
const variants = {
primary: {
@@ -21,37 +21,29 @@ const variants = {
};
type NavItemProps = {
- className: string;
- variant?: "primary" | "secondary";
+ className?: string;
+ item: NavData;
Icon: IconType;
- title: string;
- url: string;
- dev?: boolean;
onClick?: () => void;
};
export default function NavItem({
className,
- variant = "primary",
+ item,
Icon,
- title,
- url,
- dev,
onClick,
}: NavItemProps) {
- const shouldRender = dev ? ENV !== "production" : true;
-
- if (!shouldRender) {
+ if (item.enabled == false) {
return;
}
const content = (
- `${className} flex flex-col justify-center items-center rounded-lg ${
- variants[variant][isActive ? "active" : "inactive"]
+ `flex flex-col justify-center items-center rounded-lg ${className ?? ""} ${
+ variants[item.variant ?? "primary"][isActive ? "active" : "inactive"]
}`
}
>
@@ -65,7 +57,7 @@ export default function NavItem({
{content}
- {title}
+ {item.title}
diff --git a/web/src/components/navigation/Sidebar.tsx b/web/src/components/navigation/Sidebar.tsx
index d3cda8153..505ebe047 100644
--- a/web/src/components/navigation/Sidebar.tsx
+++ b/web/src/components/navigation/Sidebar.tsx
@@ -1,14 +1,16 @@
import Logo from "../Logo";
-import { navbarLinks } from "@/pages/site-navigation";
import NavItem from "./NavItem";
import { CameraGroupSelector } from "../filter/CameraGroupSelector";
import { useLocation } from "react-router-dom";
import GeneralSettings from "../settings/GeneralSettings";
import AccountSettings from "../settings/AccountSettings";
+import useNavigation from "@/hooks/use-navigation";
function Sidebar() {
const location = useLocation();
+ const navbarLinks = useNavigation();
+
return (
-
+ {loading ? (
+
+ ) : (
+
+ )}
-
+ {loading ? (
+
+ ) : (
+
+ )}
>
diff --git a/web/src/views/events/RecordingView.tsx b/web/src/views/events/RecordingView.tsx
index 9684e7dc5..c4ac49f62 100644
--- a/web/src/views/events/RecordingView.tsx
+++ b/web/src/views/events/RecordingView.tsx
@@ -39,6 +39,7 @@ import MobileTimelineDrawer from "@/components/overlay/MobileTimelineDrawer";
import MobileReviewSettingsDrawer from "@/components/overlay/MobileReviewSettingsDrawer";
import Logo from "@/components/Logo";
import { Skeleton } from "@/components/ui/skeleton";
+import { FaVideo } from "react-icons/fa";
const SEGMENT_DURATION = 30;
@@ -251,14 +252,28 @@ export function RecordingView({
{isMobile && (
)}
-