diff --git a/web/src/components/Header.tsx b/web/src/components/Header.tsx
index 608a5281c..201ffc8cb 100644
--- a/web/src/components/Header.tsx
+++ b/web/src/components/Header.tsx
@@ -1,63 +1,11 @@
import { Link } from "react-router-dom";
import Logo from "@/components/Logo";
-import {
- LuActivity,
- LuGithub,
- LuHardDrive,
- LuLifeBuoy,
- LuList,
- LuMenu,
- LuMoon,
- LuPenSquare,
- LuRotateCw,
- LuSettings,
- LuSun,
- LuSunMoon,
-} from "react-icons/lu";
-import { IoColorPalette } from "react-icons/io5";
-import { CgDarkMode } from "react-icons/cg";
+import { LuMenu } from "react-icons/lu";
import { Button } from "@/components/ui/button";
-import { VscAccount } from "react-icons/vsc";
-import {
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuGroup,
- DropdownMenuItem,
- DropdownMenuLabel,
- DropdownMenuPortal,
- DropdownMenuSeparator,
- DropdownMenuSub,
- DropdownMenuSubContent,
- DropdownMenuSubTrigger,
- DropdownMenuTrigger,
-} from "@/components/ui/dropdown-menu";
-import {
- AlertDialog,
- AlertDialogAction,
- AlertDialogCancel,
- AlertDialogContent,
- AlertDialogFooter,
- AlertDialogHeader,
- AlertDialogTitle,
-} from "@/components/ui/alert-dialog";
-import {
- colorSchemes,
- friendlyColorSchemeName,
- useTheme,
-} from "@/context/theme-provider";
-import { useEffect, useState } from "react";
-import {
- Sheet,
- SheetContent,
- SheetDescription,
- SheetHeader,
- SheetTitle,
-} from "./ui/sheet";
-import ActivityIndicator from "./ui/activity-indicator";
-import { useRestart } from "@/api/ws";
import { ENV } from "@/env";
import { NavLink } from "react-router-dom";
import { navbarLinks } from "@/pages/site-navigation";
+import SettingsDropdownMenu from "./settings/SettingsNavItems";
type HeaderProps = {
onToggleNavbar: () => void;
@@ -89,39 +37,8 @@ function HeaderNavigation() {
}
function Header({ onToggleNavbar }: HeaderProps) {
- const { theme, colorScheme, setTheme, setColorScheme } = useTheme();
- const [restartDialogOpen, setRestartDialogOpen] = useState(false);
- const [restartingSheetOpen, setRestartingSheetOpen] = useState(false);
- const [countdown, setCountdown] = useState(60);
-
- const { send: sendRestart } = useRestart();
-
- useEffect(() => {
- let countdownInterval: NodeJS.Timeout;
-
- if (restartingSheetOpen) {
- countdownInterval = setInterval(() => {
- setCountdown((prevCountdown) => prevCountdown - 1);
- }, 1000);
- }
-
- return () => {
- clearInterval(countdownInterval);
- };
- }, [restartingSheetOpen]);
-
- useEffect(() => {
- if (countdown === 0) {
- window.location.href = "/";
- }
- }, [countdown]);
-
- const handleForceReload = () => {
- window.location.href = "/";
- };
-
return (
-
+
-
-
-
-
-
-
- System
-
-
-
-
-
- Storage
-
-
-
-
-
- System metrics
-
-
-
-
-
- System logs
-
-
-
-
- Configuration
-
-
-
-
-
-
- Settings
-
-
-
-
-
- Configuration editor
-
-
- Appearance
-
-
-
-
- Dark Mode
-
-
-
- setTheme("light")}>
- {theme === "light" ? (
- <>
-
- Light
- >
- ) : (
- Light
- )}
-
- setTheme("dark")}>
- {theme === "dark" ? (
- <>
-
- Dark
- >
- ) : (
- Dark
- )}
-
- setTheme("system")}>
- {theme === "system" ? (
- <>
-
- System
- >
- ) : (
- System
- )}
-
-
-
-
-
-
-
- Theme
-
-
-
- {colorSchemes.map((scheme) => (
- setColorScheme(scheme)}
- >
- {scheme === colorScheme ? (
- <>
-
- {friendlyColorSchemeName(scheme)}
- >
- ) : (
-
- {friendlyColorSchemeName(scheme)}
-
- )}
-
- ))}
-
-
-
-
- Help
-
-
-
-
- Documentation
-
-
-
-
-
- GitHub
-
-
-
- setRestartDialogOpen(true)}>
-
- Restart Frigate
-
-
-
-
-
- {restartDialogOpen && (
-
setRestartDialogOpen(false)}
- >
-
-
-
- Are you sure you want to restart Frigate?
-
-
-
- Cancel
- {
- setRestartingSheetOpen(true);
- sendRestart("restart");
- }}
- >
- Restart
-
-
-
-
- )}
- {restartingSheetOpen && (
- <>
-
setRestartingSheetOpen(false)}
- >
- e.preventDefault()}
- >
-
-
-
-
- Frigate is Restarting
-
-
- This page will reload in {countdown} seconds.
-
-
-
-
-
-
- >
- )}
+
);
}
diff --git a/web/src/components/Logo.tsx b/web/src/components/Logo.tsx
index f5a220ce9..32cd52eda 100644
--- a/web/src/components/Logo.tsx
+++ b/web/src/components/Logo.tsx
@@ -1,6 +1,9 @@
-export default function Logo() {
+type LogoProps = {
+ className?: string;
+};
+export default function Logo({ className }: LogoProps) {
return (
-