mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-10 02:29:19 +03:00
Miscellaneous Fixes (0.17 beta) (#21912)
Some checks are pending
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
Some checks are pending
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
* fix display of custom sublabels in review item chip use "manual" as type so it's not run through translation and normalized, producing "Josh S Car" instead of "Josh's Car" * use css instead of js for reviewed button hover state in filmstrip
This commit is contained in:
parent
41b983a133
commit
ea1533f456
@ -12,7 +12,7 @@ import { useCameraPreviews } from "@/hooks/use-camera-previews";
|
||||
import { baseUrl } from "@/api/baseUrl";
|
||||
import { VideoPreview } from "../preview/ScrubbablePreview";
|
||||
import { useApiHost } from "@/api";
|
||||
import { isDesktop, isSafari } from "react-device-detect";
|
||||
import { isSafari } from "react-device-detect";
|
||||
import { useUserPersistence } from "@/hooks/use-user-persistence";
|
||||
import { Skeleton } from "../ui/skeleton";
|
||||
import { Button } from "../ui/button";
|
||||
@ -87,7 +87,6 @@ export function AnimatedEventCard({
|
||||
}, [visibilityListener]);
|
||||
|
||||
const [isLoaded, setIsLoaded] = useState(false);
|
||||
const [isHovered, setIsHovered] = useState(false);
|
||||
|
||||
// interaction
|
||||
|
||||
@ -134,18 +133,15 @@ export function AnimatedEventCard({
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<div
|
||||
className="relative h-24 flex-shrink-0 overflow-hidden rounded md:rounded-lg 4k:h-32"
|
||||
className="group relative h-24 flex-shrink-0 overflow-hidden rounded md:rounded-lg 4k:h-32"
|
||||
style={{
|
||||
aspectRatio: alertVideos ? aspectRatio : undefined,
|
||||
}}
|
||||
onMouseEnter={isDesktop ? () => setIsHovered(true) : undefined}
|
||||
onMouseLeave={isDesktop ? () => setIsHovered(false) : undefined}
|
||||
>
|
||||
{isHovered && (
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
className="absolute left-2 top-1 z-40 bg-gray-500 bg-gradient-to-br from-gray-400 to-gray-500"
|
||||
className="pointer-events-none absolute left-2 top-1 z-40 bg-gray-500 bg-gradient-to-br from-gray-400 to-gray-500 opacity-0 transition-opacity group-hover:pointer-events-auto group-hover:opacity-100"
|
||||
size="xs"
|
||||
aria-label={t("markAsReviewed")}
|
||||
onClick={async () => {
|
||||
@ -158,7 +154,6 @@ export function AnimatedEventCard({
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>{t("markAsReviewed")}</TooltipContent>
|
||||
</Tooltip>
|
||||
)}
|
||||
{previews != undefined && alertVideosLoaded && (
|
||||
<div
|
||||
className="size-full cursor-pointer"
|
||||
|
||||
@ -181,6 +181,13 @@ export default function PreviewThumbnailPlayer({
|
||||
config?.ui?.timezone,
|
||||
);
|
||||
|
||||
const getEventType = (text: string) => {
|
||||
if (review.data.objects.includes(text)) return "object";
|
||||
if (review.data.audio.includes(text)) return "audio";
|
||||
if (review.data.sub_labels?.includes(text)) return "manual";
|
||||
return "object";
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
className="relative size-full cursor-pointer"
|
||||
@ -295,7 +302,7 @@ export default function PreviewThumbnailPlayer({
|
||||
(item) =>
|
||||
item !== undefined && !item.includes("-verified"),
|
||||
)
|
||||
.map((text) => getTranslatedLabel(text))
|
||||
.map((text) => getTranslatedLabel(text, getEventType(text)))
|
||||
.sort()
|
||||
.join(", ")}
|
||||
</TooltipContent>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user