mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-22 04:56:42 +03:00
* remove frigate+ icon from explore grid footer * add margin * pointer cursor on event menu items in detail stream * don't show submit to plus for non-objects and if plus is disabled * tweak spacing in annotation settings popover * Fix deletion of classification images and library * Ensure after creating a class that things are correct * Fix dialog getting stuck * Only show the genai summary popup on mobile when timeline is open * fix audio transcription embedding * spacing * hide x icon on restart sheet to prevent closure issues * prevent x overflow in detail stream on mobile safari * ensure name is valid for search effect trigger * add trigger to detail actions menu * move find similar to actions menu * Use a column layout for MobilePageContent in PlatformAwareSheet This is so the header is outside the scrolling area and the content can grow/scroll independently. This now matches the way it's done in classification * Skip azure execution provider * add optional ref to always scroll to top the more filters in explore was not scrolled to the top on open due to the use of framer motion * fix title classes on desktop --------- Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
69 lines
2.1 KiB
TypeScript
69 lines
2.1 KiB
TypeScript
import TimeAgo from "../dynamic/TimeAgo";
|
|
import useSWR from "swr";
|
|
import { FrigateConfig } from "@/types/frigateConfig";
|
|
import { useFormattedTimestamp } from "@/hooks/use-date-utils";
|
|
import { SearchResult } from "@/types/search";
|
|
import ActivityIndicator from "../indicators/activity-indicator";
|
|
import SearchResultActions from "../menu/SearchResultActions";
|
|
import { cn } from "@/lib/utils";
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
type SearchThumbnailProps = {
|
|
searchResult: SearchResult;
|
|
columns: number;
|
|
findSimilar: () => void;
|
|
refreshResults: () => void;
|
|
showTrackingDetails: () => void;
|
|
addTrigger: () => void;
|
|
};
|
|
|
|
export default function SearchThumbnailFooter({
|
|
searchResult,
|
|
columns,
|
|
findSimilar,
|
|
refreshResults,
|
|
showTrackingDetails,
|
|
addTrigger,
|
|
}: SearchThumbnailProps) {
|
|
const { t } = useTranslation(["views/search"]);
|
|
const { data: config } = useSWR<FrigateConfig>("config");
|
|
|
|
// date
|
|
const formattedDate = useFormattedTimestamp(
|
|
searchResult.start_time,
|
|
config?.ui.time_format == "24hour"
|
|
? t("time.formattedTimestampMonthDayHourMinute.24hour", { ns: "common" })
|
|
: t("time.formattedTimestampMonthDayHourMinute.12hour", { ns: "common" }),
|
|
config?.ui.timezone,
|
|
);
|
|
|
|
return (
|
|
<div
|
|
className={cn(
|
|
"flex w-full flex-row items-center justify-between gap-2 text-white",
|
|
columns > 4 && "items-start sm:flex-col lg:flex-row lg:items-center",
|
|
)}
|
|
>
|
|
<div className="flex flex-col items-start text-xs text-white/90 drop-shadow-lg">
|
|
{searchResult.end_time ? (
|
|
<TimeAgo time={searchResult.start_time * 1000} dense />
|
|
) : (
|
|
<div>
|
|
<ActivityIndicator size={14} />
|
|
</div>
|
|
)}
|
|
{formattedDate}
|
|
</div>
|
|
<div className="flex flex-row items-center justify-end gap-5 md:gap-4">
|
|
<SearchResultActions
|
|
searchResult={searchResult}
|
|
findSimilar={findSimilar}
|
|
refreshResults={refreshResults}
|
|
showTrackingDetails={showTrackingDetails}
|
|
addTrigger={addTrigger}
|
|
/>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|