Allow the carousel 'slide' animation to be disabled.

This commit is contained in:
Dermot Duffy
2022-02-08 20:36:07 -08:00
parent ec33a2ddf8
commit 724ca4c843
9 changed files with 67 additions and 3 deletions
+16
View File
@@ -38,6 +38,7 @@ import {
CONF_EVENT_VIEWER_CONTROLS_TITLE_MODE,
CONF_EVENT_VIEWER_DRAGGABLE,
CONF_EVENT_VIEWER_LAZY_LOAD,
CONF_EVENT_VIEWER_TRANSITION_EFFECT,
CONF_IMAGE_REFRESH_SECONDS,
CONF_IMAGE_SRC,
CONF_LIVE_AUTO_UNMUTE,
@@ -52,6 +53,7 @@ import {
CONF_LIVE_LAZY_LOAD,
CONF_LIVE_LAZY_UNLOAD,
CONF_LIVE_PRELOAD,
CONF_LIVE_TRANSITION_EFFECT,
CONF_MENU_BUTTONS_CLIPS,
CONF_MENU_BUTTONS_FRIGATE,
CONF_MENU_BUTTONS_FRIGATE_DOWNLOAD,
@@ -266,6 +268,12 @@ export class FrigateCardEditor extends LitElement implements LovelaceCardEditor
],
]);
protected _transitionEffects = new Map([
['', ''],
['none', localize('config.event_viewer.transition_effects.none')],
['slide', localize('config.event_viewer.transition_effects.slide')],
]);
public setConfig(config: RawFrigateCardConfig): void {
// Note: This does not use Zod to parse the configuration, so it may be
// partially or completely invalid. It's more useful to have a partially
@@ -809,6 +817,10 @@ export class FrigateCardEditor extends LitElement implements LovelaceCardEditor
CONF_LIVE_CONTROLS_TITLE_DURATION_SECONDS,
'number',
)}
${this._renderDropdown(
CONF_LIVE_TRANSITION_EFFECT,
this._transitionEffects,
)}
</div>
`
: ''}
@@ -861,6 +873,10 @@ export class FrigateCardEditor extends LitElement implements LovelaceCardEditor
CONF_EVENT_VIEWER_CONTROLS_TITLE_DURATION_SECONDS,
'number',
)}
${this._renderDropdown(
CONF_EVENT_VIEWER_TRANSITION_EFFECT,
this._transitionEffects,
)}
</div>`
: ''}
${this._renderOptionSetHeader('image')}