mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-27 02:28:22 +03:00
chore: add InputWithTags zone friendly name support
This commit is contained in:
parent
6a72a041d6
commit
450623e927
@ -53,7 +53,7 @@ import { FrigateConfig } from "@/types/frigateConfig";
|
|||||||
import { MdImageSearch } from "react-icons/md";
|
import { MdImageSearch } from "react-icons/md";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { getTranslatedLabel } from "@/utils/i18n";
|
import { getTranslatedLabel } from "@/utils/i18n";
|
||||||
import { CameraNameLabel } from "../camera/FriendlyNameLabel";
|
import { CameraNameLabel, ZoneNameLabel } from "../camera/FriendlyNameLabel";
|
||||||
|
|
||||||
type InputWithTagsProps = {
|
type InputWithTagsProps = {
|
||||||
inputFocused: boolean;
|
inputFocused: boolean;
|
||||||
@ -831,6 +831,8 @@ export default function InputWithTags({
|
|||||||
getTranslatedLabel(value)
|
getTranslatedLabel(value)
|
||||||
) : filterType === "cameras" ? (
|
) : filterType === "cameras" ? (
|
||||||
<CameraNameLabel camera={value} />
|
<CameraNameLabel camera={value} />
|
||||||
|
) : filterType === "zones" ? (
|
||||||
|
<ZoneNameLabel zone={value} />
|
||||||
) : (
|
) : (
|
||||||
value.replaceAll("_", " ")
|
value.replaceAll("_", " ")
|
||||||
)}
|
)}
|
||||||
@ -934,6 +936,11 @@ export default function InputWithTags({
|
|||||||
<CameraNameLabel camera={suggestion} />
|
<CameraNameLabel camera={suggestion} />
|
||||||
{")"}
|
{")"}
|
||||||
</>
|
</>
|
||||||
|
) : currentFilterType === "zones" ? (
|
||||||
|
<>
|
||||||
|
{suggestion} {" ("} <ZoneNameLabel zone={suggestion} />
|
||||||
|
{")"}
|
||||||
|
</>
|
||||||
) : (
|
) : (
|
||||||
suggestion
|
suggestion
|
||||||
)
|
)
|
||||||
@ -943,6 +950,8 @@ export default function InputWithTags({
|
|||||||
{currentFilterType ? (
|
{currentFilterType ? (
|
||||||
currentFilterType === "cameras" ? (
|
currentFilterType === "cameras" ? (
|
||||||
<CameraNameLabel camera={suggestion} />
|
<CameraNameLabel camera={suggestion} />
|
||||||
|
) : currentFilterType === "zones" ? (
|
||||||
|
<ZoneNameLabel zone={suggestion} />
|
||||||
) : (
|
) : (
|
||||||
formatFilterValues(currentFilterType, suggestion)
|
formatFilterValues(currentFilterType, suggestion)
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user