This commit is contained in:
GuoQing Liu 2026-02-04 13:32:54 +08:00 committed by GitHub
commit 8beb8b8632
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 3 deletions

View File

@ -99,7 +99,7 @@ export default function SearchResultActions({
</a>
</MenuItem>
)}
{searchResult.has_snapshot && (
{searchResult.has_snapshot && searchResult?.data?.type === "object" && (
<MenuItem aria-label={t("itemMenu.downloadSnapshot.aria")}>
<a
className="flex items-center"
@ -111,6 +111,7 @@ export default function SearchResultActions({
</MenuItem>
)}
{searchResult.has_snapshot &&
searchResult?.data?.type === "object" &&
config?.cameras[searchResult.camera].snapshots.clean_copy && (
<MenuItem aria-label={t("itemMenu.downloadCleanSnapshot.aria")}>
<a

View File

@ -81,7 +81,7 @@ export default function DetailActionsMenu({
</DropdownMenuTrigger>
<DropdownMenuPortal>
<DropdownMenuContent align="end">
{search.has_snapshot && (
{search.has_snapshot && search?.data?.type === "object" && (
<DropdownMenuItem>
<a
className="w-full"
@ -95,7 +95,8 @@ export default function DetailActionsMenu({
</DropdownMenuItem>
)}
{search.has_snapshot &&
config?.cameras[search.camera].snapshots.clean_copy && (
config?.cameras[search.camera].snapshots.clean_copy &&
search?.data?.type === "object" && (
<DropdownMenuItem>
<a
className="w-full"

View File

@ -23,6 +23,7 @@ import { FrigateConfig } from "@/types/frigateConfig";
import { useTranslation } from "react-i18next";
import { getTranslatedLabel } from "@/utils/i18n";
import { LuSearchX } from "react-icons/lu";
import { getIconForLabel } from "@/utils/iconUtil";
type ExploreViewProps = {
setSearchDetail: (search: SearchResult | undefined) => void;
@ -149,6 +150,9 @@ function ThumbnailRow({
return (
<div className="rounded-lg bg-background_alt p-2 md:px-4">
<div className="flex flex-row items-center text-lg smart-capitalize">
{labelType === "audio"
? getIconForLabel("", labelType, "size-4 mr-1")
: null}
{getTranslatedLabel(label, labelType)}
{searchResults && (
<span className="ml-3 text-sm text-secondary-foreground">