mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-06 13:34:13 +03:00
fix birdseye and empty card (#20582)
This commit is contained in:
parent
4319118e94
commit
0743cb57c2
@ -175,8 +175,8 @@
|
|||||||
"exitEdit": "Exit Editing"
|
"exitEdit": "Exit Editing"
|
||||||
},
|
},
|
||||||
"noCameras": {
|
"noCameras": {
|
||||||
"title": "No Cameras Set Up",
|
"title": "No Cameras Configured",
|
||||||
"description": "Get started by connecting a camera.",
|
"description": "Get started by connecting a camera to Frigate.",
|
||||||
"buttonText": "Add Camera"
|
"buttonText": "Add Camera"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,27 +1,30 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { Button } from "../ui/button";
|
import { Button } from "../ui/button";
|
||||||
import Heading from "../ui/heading";
|
import Heading from "../ui/heading";
|
||||||
|
import { Link } from "react-router-dom";
|
||||||
|
|
||||||
type EmptyCardProps = {
|
type EmptyCardProps = {
|
||||||
icon: React.ReactNode;
|
icon: React.ReactNode;
|
||||||
title: string;
|
title: string;
|
||||||
description: string;
|
description: string;
|
||||||
buttonText?: string;
|
buttonText?: string;
|
||||||
|
link?: string;
|
||||||
};
|
};
|
||||||
export function EmptyCard({
|
export function EmptyCard({
|
||||||
icon,
|
icon,
|
||||||
title,
|
title,
|
||||||
description,
|
description,
|
||||||
buttonText,
|
buttonText,
|
||||||
|
link,
|
||||||
}: EmptyCardProps) {
|
}: EmptyCardProps) {
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col items-center gap-2">
|
<div className="flex flex-col items-center gap-2">
|
||||||
{icon}
|
{icon}
|
||||||
<Heading as="h4">{title}</Heading>
|
<Heading as="h4">{title}</Heading>
|
||||||
<div className="text-secondary-foreground">{description}</div>
|
<div className="mb-3 text-secondary-foreground">{description}</div>
|
||||||
{buttonText?.length && (
|
{buttonText?.length && (
|
||||||
<Button size="sm" variant="select">
|
<Button size="sm" variant="select">
|
||||||
{buttonText}
|
<Link to={link ?? "#"}>{buttonText}</Link>
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -354,7 +354,7 @@ export default function LiveDashboardView({
|
|||||||
onSaveMuting(true);
|
onSaveMuting(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (cameras.length == 0) {
|
if (cameras.length == 0 && !includeBirdseye) {
|
||||||
return <NoCameraView />;
|
return <NoCameraView />;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -625,6 +625,7 @@ function NoCameraView() {
|
|||||||
title={t("noCameras.title")}
|
title={t("noCameras.title")}
|
||||||
description={t("noCameras.description")}
|
description={t("noCameras.description")}
|
||||||
buttonText={t("noCameras.buttonText")}
|
buttonText={t("noCameras.buttonText")}
|
||||||
|
link="/settings?page=cameraManagement"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user