add no tracked objects and icon to explore summary view

This commit is contained in:
Josh Hawkins 2025-12-24 08:10:26 -06:00
parent 0f9f9bc443
commit a2f57c81cb

View File

@ -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]) => (