mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 10:45:21 +03:00
show/hide camera dash buttons in config
This commit is contained in:
parent
9e531b0b5b
commit
6edb4bcfb2
@ -596,6 +596,10 @@ class CameraUiConfig(FrigateBaseModel):
|
||||
dashboard: bool = Field(
|
||||
default=True, title="Show this camera in Frigate dashboard UI."
|
||||
)
|
||||
hidecambuttons: bool = Field(
|
||||
default=False,
|
||||
title="Hides this camera's Detect/Recordings/Snapshots toggle buttons in Frigate dashboard UI.",
|
||||
)
|
||||
|
||||
|
||||
class CameraConfig(FrigateBaseModel):
|
||||
|
||||
@ -54,7 +54,9 @@ function Camera({ name, config }) {
|
||||
() => { return `${name.replaceAll('_', ' ')}` },
|
||||
[name]
|
||||
);
|
||||
const icons = useMemo(
|
||||
|
||||
const hideIcons = config.ui.hidecambuttons;
|
||||
const icons = hideIcons ? [] : useMemo(
|
||||
() => [
|
||||
{
|
||||
name: `Toggle detect ${detectValue === 'ON' ? 'off' : 'on'}`,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user