Skip to content

NVR with realtime local object detection for IP cameras

Frontend Miscellaneous fixes (#23751)

GuoQing Liuc17538aff9ea
diff --git a/web/src/components/filter/LogSettingsButton.tsx b/web/src/components/filter/LogSettingsButton.tsx
index 57ba76531e..83f2e85b47 100644
--- a/web/src/components/filter/LogSettingsButton.tsx
+++ b/web/src/components/filter/LogSettingsButton.tsx
@@ -129,7 +129,7 @@ export function GeneralFilterContent({
className="mx-2 w-full cursor-pointer text-primary smart-capitalize"
htmlFor={item}
>
- {item.replaceAll("_", " ")}
+ {t(`logger.logLevel.${item}`, { ns: "views/settings" })}
</Label>
<Switch
key={item}
diff --git a/web/src/components/indicators/Chip.tsx b/web/src/components/indicators/Chip.tsx
index e6de100578..15a0d95e61 100644
--- a/web/src/components/indicators/Chip.tsx
+++ b/web/src/components/indicators/Chip.tsx
@@ -3,6 +3,7 @@ import { LogSeverity } from "@/types/log";
import { ReactNode, useMemo } from "react";
import { isIOS } from "react-device-detect";
import { AnimatePresence, motion } from "framer-motion";
+import { useTranslation } from "react-i18next";
type ChipProps = {
className?: string;
@@ -50,6 +51,7 @@ type LogChipProps = {
onClickSeverity?: () => void;
};
export function LogChip({ severity, onClickSeverity }: LogChipProps) {
+ const { t } = useTranslation(["views/settings"]);
const severityClassName = useMemo(() => {
switch (severity) {
case "info":
@@ -73,7 +75,7 @@ export function LogChip({ severity, onClickSeverity }: LogChipProps) {
}
}}
>
- {severity}
+ {t(`logger.logLevel.${severity}`, { ns: "views/settings" })}
</span>
</div>
);
diff --git a/web/src/components/ui/command.tsx b/web/src/components/ui/command.tsx
index 64be5e01a1..82183ef908 100644
--- a/web/src/components/ui/command.tsx
+++ b/web/src/components/ui/command.tsx
@@ -60,7 +60,10 @@ const CommandList = React.forwardRef<
>(({ className, ...props }, ref) => (
<CommandPrimitive.List
ref={ref}
- className={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)}
+ className={cn(
+ "scrollbar-container max-h-[300px] overflow-y-auto overflow-x-hidden",
+ className,
+ )}
{...props}
/>
));