UI Tweaks (#20403)
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
Stalebot / stale (push) Has been cancelled

* Fix context menu link to debug

* Use genai title for tooltip when available
This commit is contained in:
Nicolas Mowen
2025-10-09 09:49:42 -05:00
committed by GitHub
parent f4e7549311
commit 24a1874225
6 changed files with 52 additions and 22 deletions
+22 -14
View File
@@ -50,6 +50,27 @@ export function AnimatedEventCard({
fetchPreviews: !currentHour,
});
const tooltipText = useMemo(() => {
if (event?.data?.metadata?.title) {
return event.data.metadata.title;
}
return (
`${[
...new Set([
...(event.data.objects || []),
...(event.data.sub_labels || []),
...(event.data.audio || []),
]),
]
.filter((item) => item !== undefined && !item.includes("-verified"))
.map((text) => text.charAt(0).toUpperCase() + text.substring(1))
.sort()
.join(", ")
.replaceAll("-verified", "")} ` + t("detected")
);
}, [event, t]);
// visibility
const [windowVisible, setWindowVisible] = useState(true);
@@ -220,20 +241,7 @@ export function AnimatedEventCard({
)}
</div>
</TooltipTrigger>
<TooltipContent>
{`${[
...new Set([
...(event.data.objects || []),
...(event.data.sub_labels || []),
...(event.data.audio || []),
]),
]
.filter((item) => item !== undefined && !item.includes("-verified"))
.map((text) => text.charAt(0).toUpperCase() + text.substring(1))
.sort()
.join(", ")
.replaceAll("-verified", "")} ` + t("detected")}
</TooltipContent>
<TooltipContent>{tooltipText}</TooltipContent>
</Tooltip>
);
}
+1 -3
View File
@@ -355,9 +355,7 @@ export default function LiveContextMenu({
<div
className="flex w-full cursor-pointer items-center justify-start gap-2"
onClick={
isEnabled
? () => navigate(`/settings?page=debug&camera=${camera}`)
: undefined
isEnabled ? () => navigate(`?debug=true#${camera}`) : undefined
}
>
<div className="text-primary">