mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-30 02:27:41 +03:00
frontend and i18n
This commit is contained in:
parent
685a9f7ce3
commit
950f587f0d
@ -38,6 +38,14 @@
|
|||||||
"label": "Zoom PTZ camera out"
|
"label": "Zoom PTZ camera out"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"focus": {
|
||||||
|
"in": {
|
||||||
|
"label": "Focus PTZ camera in"
|
||||||
|
},
|
||||||
|
"out": {
|
||||||
|
"label": "Focus PTZ camera out"
|
||||||
|
}
|
||||||
|
},
|
||||||
"frame": {
|
"frame": {
|
||||||
"center": {
|
"center": {
|
||||||
"label": "Click in the frame to center the PTZ camera"
|
"label": "Click in the frame to center the PTZ camera"
|
||||||
|
|||||||
@ -1,4 +1,11 @@
|
|||||||
type PtzFeature = "pt" | "zoom" | "pt-r" | "zoom-r" | "zoom-a" | "pt-r-fov";
|
type PtzFeature =
|
||||||
|
| "pt"
|
||||||
|
| "zoom"
|
||||||
|
| "pt-r"
|
||||||
|
| "zoom-r"
|
||||||
|
| "zoom-a"
|
||||||
|
| "pt-r-fov"
|
||||||
|
| "focus";
|
||||||
|
|
||||||
export type CameraPtzInfo = {
|
export type CameraPtzInfo = {
|
||||||
name: string;
|
name: string;
|
||||||
|
|||||||
@ -92,6 +92,8 @@ import {
|
|||||||
LuX,
|
LuX,
|
||||||
} from "react-icons/lu";
|
} from "react-icons/lu";
|
||||||
import {
|
import {
|
||||||
|
MdCenterFocusStrong,
|
||||||
|
MdCenterFocusWeak,
|
||||||
MdClosedCaption,
|
MdClosedCaption,
|
||||||
MdClosedCaptionDisabled,
|
MdClosedCaptionDisabled,
|
||||||
MdNoPhotography,
|
MdNoPhotography,
|
||||||
@ -808,10 +810,10 @@ function PtzControlPanel({
|
|||||||
sendPtz("MOVE_DOWN");
|
sendPtz("MOVE_DOWN");
|
||||||
break;
|
break;
|
||||||
case "+":
|
case "+":
|
||||||
sendPtz("ZOOM_IN");
|
sendPtz(modifiers.shift ? "FOCUS_IN" : "ZOOM_IN");
|
||||||
break;
|
break;
|
||||||
case "-":
|
case "-":
|
||||||
sendPtz("ZOOM_OUT");
|
sendPtz(modifiers.shift ? "FOCUS_OUT" : "ZOOM_OUT");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -922,6 +924,40 @@ function PtzControlPanel({
|
|||||||
</TooltipButton>
|
</TooltipButton>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
{ptz?.features?.includes("focus") && (
|
||||||
|
<>
|
||||||
|
<TooltipButton
|
||||||
|
label={t("ptz.focus.in.label")}
|
||||||
|
onMouseDown={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
sendPtz("FOCUS_IN");
|
||||||
|
}}
|
||||||
|
onTouchStart={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
sendPtz("FOCUS_IN");
|
||||||
|
}}
|
||||||
|
onMouseUp={onStop}
|
||||||
|
onTouchEnd={onStop}
|
||||||
|
>
|
||||||
|
<MdCenterFocusStrong />
|
||||||
|
</TooltipButton>
|
||||||
|
<TooltipButton
|
||||||
|
label={t("ptz.focus.out.label")}
|
||||||
|
onMouseDown={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
sendPtz("FOCUS_OUT");
|
||||||
|
}}
|
||||||
|
onTouchStart={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
sendPtz("FOCUS_OUT");
|
||||||
|
}}
|
||||||
|
onMouseUp={onStop}
|
||||||
|
onTouchEnd={onStop}
|
||||||
|
>
|
||||||
|
<MdCenterFocusWeak />
|
||||||
|
</TooltipButton>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
{ptz?.features?.includes("pt-r-fov") && (
|
{ptz?.features?.includes("pt-r-fov") && (
|
||||||
<TooltipProvider>
|
<TooltipProvider>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user