diff --git a/src/editor.ts b/src/editor.ts index a33d4918..a50f0ffa 100644 --- a/src/editor.ts +++ b/src/editor.ts @@ -137,6 +137,13 @@ export class FrigateCardEditor extends LitElement implements LovelaceCardEditor none: localize('control.none'), }; + const aspectRatioModes = { + '': '', + dynamic: localize('aspect_ratio_mode.dynamic'), + static: localize('aspect_ratio_mode.static'), + unconstrained: localize('aspect_ratio_mode.unconstrained'), + } + return html`
@@ -296,6 +303,34 @@ export class FrigateCardEditor extends LitElement implements LovelaceCardEditor
+ + + ${Object.keys(aspectRatioModes).map((key) => { + return html` + ${aspectRatioModes[key]} + `; + })} + + +
+ input.split("/").map((d) => Number(d))) + .regex(/^\s*\d+\s*[:\/]\s*\d+\s*$/) + .transform((input) => input.split(/[:\/]/).map((d) => Number(d))) ).default([16, 9]), }).optional(),