mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Add portal the live player tooltip (#13389)
This commit is contained in:
parent
58a8028485
commit
3f996cd62c
@ -18,6 +18,7 @@ import Chip from "../indicators/Chip";
|
|||||||
import { capitalizeFirstLetter } from "@/utils/stringUtil";
|
import { capitalizeFirstLetter } from "@/utils/stringUtil";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import { TbExclamationCircle } from "react-icons/tb";
|
import { TbExclamationCircle } from "react-icons/tb";
|
||||||
|
import { TooltipPortal } from "@radix-ui/react-tooltip";
|
||||||
|
|
||||||
type LivePlayerProps = {
|
type LivePlayerProps = {
|
||||||
cameraRef?: (ref: HTMLDivElement | null) => void;
|
cameraRef?: (ref: HTMLDivElement | null) => void;
|
||||||
@ -258,20 +259,22 @@ export default function LivePlayer({
|
|||||||
</div>
|
</div>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
</div>
|
</div>
|
||||||
<TooltipContent className="capitalize">
|
<TooltipPortal>
|
||||||
{[
|
<TooltipContent className="capitalize">
|
||||||
...new Set([
|
{[
|
||||||
...(objects || []).map(({ label, sub_label }) =>
|
...new Set([
|
||||||
label.endsWith("verified") ? sub_label : label,
|
...(objects || []).map(({ label, sub_label }) =>
|
||||||
),
|
label.endsWith("verified") ? sub_label : label,
|
||||||
]),
|
),
|
||||||
]
|
]),
|
||||||
.filter((label) => label?.includes("-verified") == false)
|
]
|
||||||
.map((label) => capitalizeFirstLetter(label))
|
.filter((label) => label?.includes("-verified") == false)
|
||||||
.sort()
|
.map((label) => capitalizeFirstLetter(label))
|
||||||
.join(", ")
|
.sort()
|
||||||
.replaceAll("-verified", "")}
|
.join(", ")
|
||||||
</TooltipContent>
|
.replaceAll("-verified", "")}
|
||||||
|
</TooltipContent>
|
||||||
|
</TooltipPortal>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
Loading…
Reference in New Issue
Block a user