Update names to be less ambiguous

This commit is contained in:
Nick Mowen 2022-03-28 09:59:17 -06:00
parent e91339a7ac
commit 4ca6a592a6
4 changed files with 9 additions and 7 deletions

View File

@ -434,9 +434,11 @@ cameras:
# Optional: Configuration for how camera is handled in the GUI.
ui:
# Optional: Adjust sort order of cameras in the GUI. Larger numbers come later (default: shown below)
# Optional: Adjust sort order of cameras in the UI. Larger numbers come later (default: shown below)
# By default the cameras are sorted alphabetically.
order: 0
# Optional: Whether or not to show the camera in the GUI (default: shown below)
show: True
# Optional: Whether or not to show the camera in the Frigate UI (default: shown below)
dashboard: True
# Optional: Whether or not to show the camera in the Frigate Birdseye View (default: shown below)
birdseye: True
```

View File

@ -502,7 +502,7 @@ class CameraLiveConfig(FrigateBaseModel):
class CameraUiConfig(FrigateBaseModel):
birdseye: bool = Field(default=True, title="Show this camera in Frigate Birdseye View.")
order: int = Field(default=0, title="Order of camera in UI.")
show: bool = Field(default=True, title="Show this camera in Frigate UI.")
dashboard: bool = Field(default=True, title="Show this camera in Frigate dashboard UI.")
class CameraConfig(FrigateBaseModel):

View File

@ -52,7 +52,7 @@ function SortedCameras({ unsortedCameras }) {
const sortedCameras = useMemo(() =>
Object.entries(unsortedCameras)
.filter(([_, conf]) => conf.ui.show)
.filter(([_, conf]) => conf.ui.dashboard)
.sort(([_, aConf], [__, bConf]) => aConf.ui.order === bConf.ui.order ? 0 : (aConf.ui.order > bConf.ui.order ? 1 : -1)),
[unsortedCameras]);
@ -71,7 +71,7 @@ function SortedRecordingCameras({ unsortedCameras }) {
const sortedCameras = useMemo(() =>
Object.entries(unsortedCameras)
.filter(([_, conf]) => conf.ui.show)
.filter(([_, conf]) => conf.ui.dashboard)
.sort(([_, aConf], [__, bConf]) => aConf.ui.order === bConf.ui.order ? 0 : (aConf.ui.order > bConf.ui.order ? 1 : -1)),
[unsortedCameras]);

View File

@ -25,7 +25,7 @@ function SortedCameras({ unsortedCameras }) {
const sortedCameras = useMemo(() =>
Object.entries(unsortedCameras)
.filter(([_, conf]) => conf.ui.show)
.filter(([_, conf]) => conf.ui.dashboard)
.sort(([_, aConf], [__, bConf]) => aConf.ui.order === bConf.ui.order ? 0 : (aConf.ui.order > bConf.ui.order ? 1 : -1)),
[unsortedCameras]);