mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-03 06:50:58 +00:00
Compare commits
No commits in common. "6f2e6c4cb24c780210aa5a8a56d89d66b721faf4" and "49793aa655ace8c6a0a1275c43ead86d222cccbc" have entirely different histories.
6f2e6c4cb2
...
49793aa655
6
web/src/components/input/InputWithTags.tsx
Executable file → Normal file
6
web/src/components/input/InputWithTags.tsx
Executable file → Normal file
@ -420,11 +420,11 @@ export default function InputWithTags({
|
||||
? t("button.yes", { ns: "common" })
|
||||
: t("button.no", { ns: "common" });
|
||||
} else if (filterType === "labels") {
|
||||
return getTranslatedLabel(String(filterValues));
|
||||
return getTranslatedLabel(filterValues as string);
|
||||
} else if (filterType === "search_type") {
|
||||
return t("filter.searchType." + String(filterValues));
|
||||
return t("filter.searchType." + (filterValues as string));
|
||||
} else {
|
||||
return String(filterValues).replaceAll("_", " ");
|
||||
return (filterValues as string).replaceAll("_", " ");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -26,15 +26,6 @@ import { useDocDomain } from "@/hooks/use-doc-domain";
|
||||
|
||||
const API_LIMIT = 25;
|
||||
|
||||
// always parse these as string arrays
|
||||
const SEARCH_FILTER_ARRAY_KEYS = [
|
||||
"cameras",
|
||||
"labels",
|
||||
"sub_labels",
|
||||
"recognized_license_plate",
|
||||
"zones",
|
||||
];
|
||||
|
||||
export default function Explore() {
|
||||
// search field handler
|
||||
|
||||
@ -67,7 +58,13 @@ export default function Explore() {
|
||||
const [search, setSearch] = useState("");
|
||||
|
||||
const [searchFilter, setSearchFilter, searchSearchParams] =
|
||||
useApiFilterArgs<SearchFilter>(SEARCH_FILTER_ARRAY_KEYS);
|
||||
useApiFilterArgs<SearchFilter>([
|
||||
"cameras",
|
||||
"labels",
|
||||
"sub_labels",
|
||||
"recognized_license_plate",
|
||||
"zones",
|
||||
]);
|
||||
|
||||
const searchTerm = useMemo(
|
||||
() => searchSearchParams?.["query"] || "",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user