mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 17:12:16 +03:00
Miscellaneous fixes (0.17 beta) (#21699)
CI / AMD64 Build (push) Has been cancelled
CI / ARM Build (push) Has been cancelled
CI / Jetson Jetpack 6 (push) Has been cancelled
CI / AMD64 Extra Build (push) Has been cancelled
CI / ARM Extra Build (push) Has been cancelled
CI / Synaptics Build (push) Has been cancelled
CI / Assemble and push default build (push) Has been cancelled
CI / AMD64 Build (push) Has been cancelled
CI / ARM Build (push) Has been cancelled
CI / Jetson Jetpack 6 (push) Has been cancelled
CI / AMD64 Extra Build (push) Has been cancelled
CI / ARM Extra Build (push) Has been cancelled
CI / Synaptics Build (push) Has been cancelled
CI / Assemble and push default build (push) Has been cancelled
* tracking details tweaks - fix 4:3 layout - get and use aspect of record stream if different from detect stream * aspect ratio docs tip * spacing * fix * i18n fix * additional logs on ffmpeg exit * improve no camera view instead of showing an "add camera" message, show a specific message for empty camera groups when frigate already has cameras added * add note about separate onvif accounts in some camera firmware * clarify review summary report docs * review settings tweaks - remove horizontal divider - update description language for switches - keep save button disabled until review classification settings change * use correct Toaster component from shadcn * clarify support for intel b-series (battlemage) gpus * add clarifying comment to dummy camera docs
This commit is contained in:
@@ -447,7 +447,7 @@ export default function LiveDashboardView({
|
||||
)}
|
||||
|
||||
{cameras.length == 0 && !includeBirdseye ? (
|
||||
<NoCameraView />
|
||||
<NoCameraView cameraGroup={cameraGroup} />
|
||||
) : (
|
||||
<>
|
||||
{!fullscreen && events && events.length > 0 && (
|
||||
@@ -666,28 +666,39 @@ export default function LiveDashboardView({
|
||||
);
|
||||
}
|
||||
|
||||
function NoCameraView() {
|
||||
function NoCameraView({ cameraGroup }: { cameraGroup?: string }) {
|
||||
const { t } = useTranslation(["views/live"]);
|
||||
const { auth } = useContext(AuthContext);
|
||||
const isAdmin = useIsAdmin();
|
||||
|
||||
// Check if this is a restricted user with no cameras in this group
|
||||
const isDefault = cameraGroup === "default";
|
||||
const isRestricted = !isAdmin && auth.isAuthenticated;
|
||||
|
||||
let type: "default" | "group" | "restricted";
|
||||
if (isRestricted) {
|
||||
type = "restricted";
|
||||
} else if (isDefault) {
|
||||
type = "default";
|
||||
} else {
|
||||
type = "group";
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex size-full items-center justify-center">
|
||||
<EmptyCard
|
||||
icon={<BsFillCameraVideoOffFill className="size-8" />}
|
||||
title={
|
||||
isRestricted ? t("noCameras.restricted.title") : t("noCameras.title")
|
||||
title={t(`noCameras.${type}.title`)}
|
||||
description={t(`noCameras.${type}.description`)}
|
||||
buttonText={
|
||||
type !== "restricted" && isDefault
|
||||
? t(`noCameras.${type}.buttonText`)
|
||||
: undefined
|
||||
}
|
||||
description={
|
||||
isRestricted
|
||||
? t("noCameras.restricted.description")
|
||||
: t("noCameras.description")
|
||||
link={
|
||||
type !== "restricted" && isDefault
|
||||
? "/settings?page=cameraManagement"
|
||||
: undefined
|
||||
}
|
||||
buttonText={!isRestricted ? t("noCameras.buttonText") : undefined}
|
||||
link={!isRestricted ? "/settings?page=cameraManagement" : undefined}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user