mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 18:55:23 +03:00
Remove label and make overlay respect selected theme
This commit is contained in:
parent
6fb5fdae51
commit
e92916e955
@ -1,7 +1,7 @@
|
|||||||
import { Fragment, h } from 'preact';
|
import { Fragment, h } from 'preact';
|
||||||
import { useState } from 'preact/hooks';
|
import { useState } from 'preact/hooks';
|
||||||
|
|
||||||
export default function TimelineEventOverlay({ event, eventOverlay, cameraConfig }) {
|
export default function TimelineEventOverlay({ eventOverlay, cameraConfig }) {
|
||||||
const boxLeftEdge = Math.round(eventOverlay.data.box[0] * 100);
|
const boxLeftEdge = Math.round(eventOverlay.data.box[0] * 100);
|
||||||
const boxTopEdge = Math.round(eventOverlay.data.box[1] * 100);
|
const boxTopEdge = Math.round(eventOverlay.data.box[1] * 100);
|
||||||
const boxRightEdge = Math.round((1 - eventOverlay.data.box[2] - eventOverlay.data.box[0]) * 100);
|
const boxRightEdge = Math.round((1 - eventOverlay.data.box[2] - eventOverlay.data.box[0]) * 100);
|
||||||
@ -55,8 +55,7 @@ export default function TimelineEventOverlay({ event, eventOverlay, cameraConfig
|
|||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
{isHovering && (
|
{isHovering && (
|
||||||
<div className="absolute bg-slate-800 p-4 block text-white text-lg" style={getHoverStyle()}>
|
<div className="absolute bg-white dark:bg-slate-800 p-4 block dark:text-white text-lg" style={getHoverStyle()}>
|
||||||
<div className="font-bold text-xl">{event.label} attributes:</div>
|
|
||||||
<div>{`Area: ${getObjectArea()} px`}</div>
|
<div>{`Area: ${getObjectArea()} px`}</div>
|
||||||
<div>{`Ratio: ${getObjectRatio()}`}</div>
|
<div>{`Ratio: ${getObjectRatio()}`}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -719,7 +719,6 @@ export default function Events({ path, ...props }) {
|
|||||||
>
|
>
|
||||||
{eventOverlay ? (
|
{eventOverlay ? (
|
||||||
<TimelineEventOverlay
|
<TimelineEventOverlay
|
||||||
event={event}
|
|
||||||
eventOverlay={eventOverlay}
|
eventOverlay={eventOverlay}
|
||||||
cameraConfig={config.cameras[event.camera]}
|
cameraConfig={config.cameras[event.camera]}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user