forked from Github/frigate
Events Page: Added option to override browser time format and style (#5538)
* use12hour optional config * use12hour config arg * added use12HourFormat arg to format function * dateStyle & timeStyle option * moved timezone & locales to format function * added dateStyle & timeStyle * re-formatted * added strftime_fmt config entry * strftime package * added strftime option * underscore instead of camelCase * underscore props instead of camelCase
This commit is contained in:
committed by
GitHub
parent
fbf29667d4
commit
3611e874ca
@@ -66,12 +66,29 @@ class LiveModeEnum(str, Enum):
|
||||
webrtc = "webrtc"
|
||||
|
||||
|
||||
class DateTimeStyleEnum(str, Enum):
|
||||
full = "full"
|
||||
long = "long"
|
||||
medium = "medium"
|
||||
short = "short"
|
||||
|
||||
|
||||
class UIConfig(FrigateBaseModel):
|
||||
live_mode: LiveModeEnum = Field(
|
||||
default=LiveModeEnum.mse, title="Default Live Mode."
|
||||
)
|
||||
timezone: Optional[str] = Field(title="Override UI timezone.")
|
||||
use_experimental: bool = Field(default=False, title="Experimental UI")
|
||||
use12hour: Optional[bool] = Field(title="Override UI time format.")
|
||||
date_style: DateTimeStyleEnum = Field(
|
||||
default=DateTimeStyleEnum.short, title="Override UI dateStyle."
|
||||
)
|
||||
time_style: DateTimeStyleEnum = Field(
|
||||
default=DateTimeStyleEnum.medium, title="Override UI timeStyle."
|
||||
)
|
||||
strftime_fmt: Optional[str] = Field(
|
||||
default=None, title="Override date and time format using strftime syntax."
|
||||
)
|
||||
|
||||
|
||||
class TelemetryConfig(FrigateBaseModel):
|
||||
|
||||
Reference in New Issue
Block a user