mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-29 07:09:03 +03:00
Miscellaneous fixes (0.17 beta) (#21934)
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 / Assemble and push default build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
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 / Assemble and push default build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
* improve chip tooltip display - use formatList to use i18n separators instead of commas - ensure the correct event type is used so sublabels are not run through normalization - remove smart-capitalization classes as translated labels use i18n (which includes capitalization) - give icons an optional key so that the console doesn't complain about duplication when rendering * Add grace period for recording segment checks to prevent spurious ffmpeg restarts * add admin precedence to proxy role_map resolution to prevent downgrade * clean up * formatting * work around radix pointer events issue when dialog is opened from drawer fixes https://github.com/blakeblackshear/frigate/discussions/21940 * prevent console warnings about missing titles and descriptions make these invisible with sr-only * remove duplicate language * Adjust handling for device sizes * Cleanup --------- Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
This commit is contained in:
co-authored by
Nicolas Mowen
parent
e1005ac2a5
commit
67e3f8eefa
@@ -371,22 +371,23 @@ export default function LivePlayer({
|
||||
</TooltipTrigger>
|
||||
</div>
|
||||
<TooltipPortal>
|
||||
<TooltipContent className="smart-capitalize">
|
||||
<TooltipContent>
|
||||
{formatList(
|
||||
[
|
||||
...new Set([
|
||||
...(objects || []).map(({ label, sub_label }) =>
|
||||
label.endsWith("verified")
|
||||
? sub_label
|
||||
: label.replaceAll("_", " "),
|
||||
),
|
||||
]),
|
||||
]
|
||||
.filter((label) => label?.includes("-verified") == false)
|
||||
.map((label) =>
|
||||
getTranslatedLabel(label.replace("-verified", "")),
|
||||
)
|
||||
.sort(),
|
||||
...new Set(
|
||||
(objects || [])
|
||||
.map(({ label, sub_label }) => {
|
||||
const isManual = label.endsWith("verified");
|
||||
const text = isManual ? sub_label : label;
|
||||
const type = isManual ? "manual" : "object";
|
||||
return getTranslatedLabel(text, type);
|
||||
})
|
||||
.filter(
|
||||
(translated) =>
|
||||
translated && !translated.includes("-verified"),
|
||||
),
|
||||
),
|
||||
].sort(),
|
||||
)}
|
||||
</TooltipContent>
|
||||
</TooltipPortal>
|
||||
|
||||
@@ -28,6 +28,7 @@ import { useTranslation } from "react-i18next";
|
||||
import { FaExclamationTriangle } from "react-icons/fa";
|
||||
import { MdOutlinePersonSearch } from "react-icons/md";
|
||||
import { getTranslatedLabel } from "@/utils/i18n";
|
||||
import { formatList } from "@/utils/stringUtil";
|
||||
|
||||
type PreviewPlayerProps = {
|
||||
review: ReviewSegment;
|
||||
@@ -182,9 +183,8 @@ export default function PreviewThumbnailPlayer({
|
||||
);
|
||||
|
||||
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";
|
||||
if (review.data.audio.includes(text)) return "audio";
|
||||
return "object";
|
||||
};
|
||||
|
||||
@@ -268,13 +268,16 @@ export default function PreviewThumbnailPlayer({
|
||||
className={`flex items-start justify-between space-x-1 ${playingBack ? "hidden" : ""} bg-gradient-to-br ${review.has_been_reviewed ? "bg-green-600 from-green-600 to-green-700" : "bg-gray-500 from-gray-400 to-gray-500"} z-0`}
|
||||
onClick={() => onClick(review, false, true)}
|
||||
>
|
||||
{review.data.objects.sort().map((object) => {
|
||||
return getIconForLabel(
|
||||
object,
|
||||
"object",
|
||||
"size-3 text-white",
|
||||
);
|
||||
})}
|
||||
{review.data.objects
|
||||
.sort()
|
||||
.map((object, idx) =>
|
||||
getIconForLabel(
|
||||
object,
|
||||
"object",
|
||||
"size-3 text-white",
|
||||
`${object}-${idx}`,
|
||||
),
|
||||
)}
|
||||
{review.data.audio.map((audio) => {
|
||||
return getIconForLabel(
|
||||
audio,
|
||||
@@ -288,23 +291,25 @@ export default function PreviewThumbnailPlayer({
|
||||
</div>
|
||||
</TooltipTrigger>
|
||||
</div>
|
||||
<TooltipContent className="smart-capitalize">
|
||||
<TooltipContent>
|
||||
{review.data.metadata
|
||||
? review.data.metadata.title
|
||||
: [
|
||||
...new Set([
|
||||
...(review.data.objects || []),
|
||||
...(review.data.sub_labels || []),
|
||||
...(review.data.audio || []),
|
||||
]),
|
||||
]
|
||||
.filter(
|
||||
(item) =>
|
||||
item !== undefined && !item.includes("-verified"),
|
||||
)
|
||||
.map((text) => getTranslatedLabel(text, getEventType(text)))
|
||||
.sort()
|
||||
.join(", ")}
|
||||
: formatList(
|
||||
[
|
||||
...new Set([
|
||||
...(review.data.objects || []).map((text) =>
|
||||
text.replace("-verified", ""),
|
||||
),
|
||||
...(review.data.sub_labels || []),
|
||||
...(review.data.audio || []),
|
||||
]),
|
||||
]
|
||||
.filter((item) => item !== undefined)
|
||||
.map((text) =>
|
||||
getTranslatedLabel(text, getEventType(text)),
|
||||
)
|
||||
.sort(),
|
||||
)}
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
{!!(
|
||||
|
||||
Reference in New Issue
Block a user