mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-01-25 21:48:30 +03:00
frontend
This commit is contained in:
parent
b569f30820
commit
b2ceb15db4
@ -81,6 +81,11 @@ export default function LivePlayer({
|
|||||||
const internalContainerRef = useRef<HTMLDivElement | null>(null);
|
const internalContainerRef = useRef<HTMLDivElement | null>(null);
|
||||||
|
|
||||||
const cameraName = useCameraFriendlyName(cameraConfig);
|
const cameraName = useCameraFriendlyName(cameraConfig);
|
||||||
|
|
||||||
|
// player is showing on a dashboard if containerRef is not provided
|
||||||
|
|
||||||
|
const inDashboard = containerRef?.current == null;
|
||||||
|
|
||||||
// stats
|
// stats
|
||||||
|
|
||||||
const [stats, setStats] = useState<PlayerStatsType>({
|
const [stats, setStats] = useState<PlayerStatsType>({
|
||||||
@ -408,6 +413,28 @@ export default function LivePlayer({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{offline && inDashboard && (
|
||||||
|
<>
|
||||||
|
<div className="absolute inset-0 rounded-lg bg-black/50 md:rounded-2xl" />
|
||||||
|
<div className="absolute inset-0 left-1/2 top-1/2 flex -translate-x-1/2 -translate-y-1/2 items-center justify-center">
|
||||||
|
<div className="flex flex-col items-center justify-center gap-2 rounded-lg bg-background/50 p-3 text-center">
|
||||||
|
<div className="text-md">{t("streamOffline.title")}</div>
|
||||||
|
<TbExclamationCircle className="size-6" />
|
||||||
|
<p className="text-center text-sm">
|
||||||
|
<Trans
|
||||||
|
ns="components/player"
|
||||||
|
values={{
|
||||||
|
cameraName: cameraName,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
streamOffline.desc
|
||||||
|
</Trans>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
{offline && !showStillWithoutActivity && cameraEnabled && (
|
{offline && !showStillWithoutActivity && cameraEnabled && (
|
||||||
<div className="absolute inset-0 left-1/2 top-1/2 flex h-96 w-96 -translate-x-1/2 -translate-y-1/2">
|
<div className="absolute inset-0 left-1/2 top-1/2 flex h-96 w-96 -translate-x-1/2 -translate-y-1/2">
|
||||||
<div className="flex flex-col items-center justify-center rounded-lg bg-background/50 p-5">
|
<div className="flex flex-col items-center justify-center rounded-lg bg-background/50 p-5">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user