forked from Github/frigate
FEAT: Ability to reorder & ability to hide Cameras in UI (#2981)
* Add options for reordering and hiding cameras selectively * Add newline at end of camera file * Make each camera for birdseye togglable as well * Update names to be less ambiguous * Update defaults * Include sidebar change * Remove birdseye toggle (will be added in separate PR) * Remove birdseye toggle (will be added in separate PR) * Remove birdseye toggle (will be added in separate PR) * Update sidebar to only sort cameras once * Simplify sorting logic
This commit is contained in:
@@ -514,6 +514,11 @@ class CameraLiveConfig(FrigateBaseModel):
|
||||
quality: int = Field(default=8, ge=1, le=31, title="Live camera view quality")
|
||||
|
||||
|
||||
class CameraUiConfig(FrigateBaseModel):
|
||||
order: int = Field(default=0, title="Order of camera in UI.")
|
||||
dashboard: bool = Field(default=True, title="Show this camera in Frigate dashboard UI.")
|
||||
|
||||
|
||||
class CameraConfig(FrigateBaseModel):
|
||||
name: Optional[str] = Field(title="Camera name.", regex="^[a-zA-Z0-9_-]+$")
|
||||
ffmpeg: CameraFfmpegConfig = Field(title="FFmpeg configuration for the camera.")
|
||||
@@ -546,6 +551,9 @@ class CameraConfig(FrigateBaseModel):
|
||||
detect: DetectConfig = Field(
|
||||
default_factory=DetectConfig, title="Object detection configuration."
|
||||
)
|
||||
ui: CameraUiConfig = Field(
|
||||
default_factory=CameraUiConfig, title="Camera UI Modifications."
|
||||
)
|
||||
birdseye: BirdseyeCameraConfig = Field(
|
||||
default_factory=BirdseyeCameraConfig, title="Birdseye camera configuration."
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user