mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-10 17:17:42 +03:00
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"
This commit is contained in:
parent
41b983a133
commit
3ba292aba7
@ -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