keep record toggle switch in single camera view disabled until enabled in config

This commit is contained in:
Josh Hawkins 2026-05-06 20:16:35 -05:00
parent 1bf4bc8af8
commit e7a5f76f26
2 changed files with 6 additions and 3 deletions

View File

@ -70,7 +70,8 @@
},
"recording": {
"enable": "Enable Recording",
"disable": "Disable Recording"
"disable": "Disable Recording",
"disabledInConfig": "Recording must first be enabled in Settings for this camera."
},
"snapshots": {
"enable": "Enable Snapshots",

View File

@ -1072,10 +1072,12 @@ function FrigateCameraFeatures({
title={
recordState == "ON"
? t("recording.disable")
: t("recording.enable")
: camera.record.enabled_in_config
? t("recording.enable")
: t("recording.disabledInConfig")
}
onClick={() => sendRecord(recordState == "ON" ? "OFF" : "ON")}
disabled={!cameraEnabled}
disabled={!cameraEnabled || !camera.record.enabled_in_config}
/>
<CameraFeatureToggle
className="p-2 md:p-0"