mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-30 11:54:52 +03:00
tweaks
This commit is contained in:
parent
4b16b114ce
commit
684778ad46
@ -5,7 +5,7 @@
|
|||||||
"selectCamera": "Motion Search is loading",
|
"selectCamera": "Motion Search is loading",
|
||||||
"startSearch": "Start Search",
|
"startSearch": "Start Search",
|
||||||
"searchStarted": "Search started",
|
"searchStarted": "Search started",
|
||||||
"searchCanceled": "Search canceled",
|
"searchCancelled": "Search cancelled",
|
||||||
"cancelSearch": "Cancel",
|
"cancelSearch": "Cancel",
|
||||||
"searching": "Search in progress.",
|
"searching": "Search in progress.",
|
||||||
"searchComplete": "Search complete",
|
"searchComplete": "Search complete",
|
||||||
|
|||||||
@ -58,6 +58,7 @@ import { IoMdArrowRoundBack } from "react-icons/io";
|
|||||||
import { FaArrowDown, FaCalendarAlt, FaCog, FaFire } from "react-icons/fa";
|
import { FaArrowDown, FaCalendarAlt, FaCog, FaFire } from "react-icons/fa";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { LuSearch } from "react-icons/lu";
|
import { LuSearch } from "react-icons/lu";
|
||||||
|
import ActivityIndicator from "@/components/indicators/activity-indicator";
|
||||||
|
|
||||||
type MotionSearchViewProps = {
|
type MotionSearchViewProps = {
|
||||||
config: FrigateConfig;
|
config: FrigateConfig;
|
||||||
@ -746,7 +747,7 @@ export default function MotionSearchView({
|
|||||||
if (jobId && jobCamera) {
|
if (jobId && jobCamera) {
|
||||||
void cancelMotionSearchJob(jobId, jobCamera);
|
void cancelMotionSearchJob(jobId, jobCamera);
|
||||||
if (isSearching) {
|
if (isSearching) {
|
||||||
toast.message(t("searchCanceled"));
|
toast.message(t("searchCancelled"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setSearchResults([]);
|
setSearchResults([]);
|
||||||
@ -905,7 +906,7 @@ export default function MotionSearchView({
|
|||||||
setIsSearching(false);
|
setIsSearching(false);
|
||||||
setJobId(null);
|
setJobId(null);
|
||||||
setJobCamera(null);
|
setJobCamera(null);
|
||||||
toast.message(t("searchCanceled"));
|
toast.message(t("searchCancelled"));
|
||||||
}
|
}
|
||||||
}, [jobStatus, t]);
|
}, [jobStatus, t]);
|
||||||
|
|
||||||
@ -1013,17 +1014,21 @@ export default function MotionSearchView({
|
|||||||
<ScrollArea className="flex-1">
|
<ScrollArea className="flex-1">
|
||||||
{isSearching && (
|
{isSearching && (
|
||||||
<div className="flex flex-col gap-2 border-b p-3 text-sm text-muted-foreground">
|
<div className="flex flex-col gap-2 border-b p-3 text-sm text-muted-foreground">
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between gap-2">
|
||||||
<span>{t("searching")}</span>
|
<div className="flex flex-col gap-1 text-wrap">
|
||||||
|
<ActivityIndicator className="mr-2 size-4" />
|
||||||
|
<div>{t("searching")}</div>
|
||||||
|
</div>
|
||||||
<Button
|
<Button
|
||||||
variant="destructive"
|
variant="destructive"
|
||||||
|
className="text-white"
|
||||||
size="sm"
|
size="sm"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
void cancelMotionSearchJob(jobId, jobCamera);
|
void cancelMotionSearchJob(jobId, jobCamera);
|
||||||
setIsSearching(false);
|
setIsSearching(false);
|
||||||
setJobId(null);
|
setJobId(null);
|
||||||
setJobCamera(null);
|
setJobCamera(null);
|
||||||
toast.success(t("searchCanceled"));
|
toast.success(t("searchCancelled"));
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t("cancelSearch")}
|
{t("cancelSearch")}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user