mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-01-22 20:18:30 +03:00
add no tracked objects and icon to explore summary view
This commit is contained in:
parent
0f9f9bc443
commit
a2f57c81cb
@ -22,6 +22,7 @@ import { SearchTab } from "@/components/overlay/detail/SearchDetailDialog";
|
||||
import { FrigateConfig } from "@/types/frigateConfig";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { getTranslatedLabel } from "@/utils/i18n";
|
||||
import { LuSearchX } from "react-icons/lu";
|
||||
|
||||
type ExploreViewProps = {
|
||||
setSearchDetail: (search: SearchResult | undefined) => void;
|
||||
@ -86,6 +87,15 @@ export default function ExploreView({
|
||||
);
|
||||
}
|
||||
|
||||
if (eventsByLabel && Object.keys(eventsByLabel).length == 0 && !isLoading) {
|
||||
return (
|
||||
<div className="absolute left-1/2 top-1/2 flex -translate-x-1/2 -translate-y-1/2 flex-col items-center justify-center text-center">
|
||||
<LuSearchX className="size-16" />
|
||||
{t("noTrackedObjects")}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="mx-2 space-y-4">
|
||||
{Object.entries(eventsByLabel).map(([label, filteredEvents]) => (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user