mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-24 07:44:30 +03:00
fix: fix debug page open camera web ui i18n and camera nickname support
This commit is contained in:
parent
1d3620a76c
commit
759998ff8b
@ -415,6 +415,7 @@
|
|||||||
"title": "Debug",
|
"title": "Debug",
|
||||||
"detectorDesc": "Frigate uses your detectors ({{detectors}}) to detect objects in your camera's video stream.",
|
"detectorDesc": "Frigate uses your detectors ({{detectors}}) to detect objects in your camera's video stream.",
|
||||||
"desc": "Debugging view shows a real-time view of tracked objects and their statistics. The object list shows a time-delayed summary of detected objects.",
|
"desc": "Debugging view shows a real-time view of tracked objects and their statistics. The object list shows a time-delayed summary of detected objects.",
|
||||||
|
"openCameraWebUI": "Open {{camera}}'s Web UI",
|
||||||
"debugging": "Debugging",
|
"debugging": "Debugging",
|
||||||
"objectList": "Object List",
|
"objectList": "Object List",
|
||||||
"noObjects": "No objects",
|
"noObjects": "No objects",
|
||||||
|
|||||||
@ -30,6 +30,7 @@ import { isDesktop } from "react-device-detect";
|
|||||||
import { Trans, useTranslation } from "react-i18next";
|
import { Trans, useTranslation } from "react-i18next";
|
||||||
import { useDocDomain } from "@/hooks/use-doc-domain";
|
import { useDocDomain } from "@/hooks/use-doc-domain";
|
||||||
import { getTranslatedLabel } from "@/utils/i18n";
|
import { getTranslatedLabel } from "@/utils/i18n";
|
||||||
|
import { useCameraNickname } from "@/hooks/use-camera-nickname";
|
||||||
|
|
||||||
type ObjectSettingsViewProps = {
|
type ObjectSettingsViewProps = {
|
||||||
selectedCamera?: string;
|
selectedCamera?: string;
|
||||||
@ -126,6 +127,8 @@ export default function ObjectSettingsView({
|
|||||||
}
|
}
|
||||||
}, [config, selectedCamera]);
|
}, [config, selectedCamera]);
|
||||||
|
|
||||||
|
const cameraName = useCameraNickname(cameraConfig);
|
||||||
|
|
||||||
const { objects } = useCameraActivity(cameraConfig ?? ({} as CameraConfig));
|
const { objects } = useCameraActivity(cameraConfig ?? ({} as CameraConfig));
|
||||||
|
|
||||||
const memoizedObjects = useDeepMemo(objects);
|
const memoizedObjects = useDeepMemo(objects);
|
||||||
@ -181,7 +184,9 @@ export default function ObjectSettingsView({
|
|||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
className="inline"
|
className="inline"
|
||||||
>
|
>
|
||||||
Open {capitalizeFirstLetter(cameraConfig.name)}'s Web UI
|
{t("debug.openCameraWebUI", {
|
||||||
|
camera: cameraName,
|
||||||
|
})}
|
||||||
<LuExternalLink className="ml-2 inline-flex size-3" />
|
<LuExternalLink className="ml-2 inline-flex size-3" />
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user