mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-06-22 04:11:53 +03:00
Some checks are pending
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
* add ptz presets and default role widgets * language tweaks * fix width in triggers view * tweak iOS PWA message in notifications settings * deprecate ui.date_style and ui.time_style these have been unused since date/time formatting has been pushed to i18n * add config migrator to remove date_style and time_style * remove date_style and time_style from reference config * fix camera list scrolling in state classification wizard on mobile
38 lines
1004 B
Python
38 lines
1004 B
Python
from enum import Enum
|
|
from typing import Optional
|
|
|
|
from pydantic import Field
|
|
|
|
from .base import FrigateBaseModel
|
|
|
|
__all__ = ["TimeFormatEnum", "UnitSystemEnum", "UIConfig"]
|
|
|
|
|
|
class TimeFormatEnum(str, Enum):
|
|
browser = "browser"
|
|
hours12 = "12hour"
|
|
hours24 = "24hour"
|
|
|
|
|
|
class UnitSystemEnum(str, Enum):
|
|
imperial = "imperial"
|
|
metric = "metric"
|
|
|
|
|
|
class UIConfig(FrigateBaseModel):
|
|
timezone: Optional[str] = Field(
|
|
default=None,
|
|
title="Timezone",
|
|
description="Optional timezone to display across the UI (defaults to browser local time if unset).",
|
|
)
|
|
time_format: TimeFormatEnum = Field(
|
|
default=TimeFormatEnum.browser,
|
|
title="Time format",
|
|
description="Time format to use in the UI (browser, 12hour, or 24hour).",
|
|
)
|
|
unit_system: UnitSystemEnum = Field(
|
|
default=UnitSystemEnum.metric,
|
|
title="Unit system",
|
|
description="Unit system for display (metric or imperial) used in the UI and MQTT.",
|
|
)
|