Add support for both snapshots/clips in timeline.

This commit is contained in:
Dermot Duffy
2022-04-04 21:25:12 -07:00
parent f98d749d07
commit 9c372815f2
10 changed files with 212 additions and 157 deletions
+4 -3
View File
@@ -1,7 +1,7 @@
import { CSSResultGroup, LitElement, TemplateResult, html, unsafeCSS } from 'lit';
import { HomeAssistant } from 'custom-card-helpers';
import { Task } from '@lit-labs/task';
import { customElement, property, state } from 'lit/decorators.js';
import { customElement, property } from 'lit/decorators.js';
import { BrowseMediaUtil } from '../browse-media-util.js';
import {
@@ -45,7 +45,8 @@ export class FrigateCardSurround extends LitElement {
]);
/**
* Fetch thumbnail media.
* Fetch thumbnail media when a target is not specified in the view (e.g. for
* the live view).
* @param param Task parameters.
* @returns
*/
@@ -121,7 +122,7 @@ export class FrigateCardSurround extends LitElement {
@frigate-card:carousel:tap=${(ev: CustomEvent<ThumbnailCarouselTap>) => {
this.view
?.evolve({
...(this.targetView && { view: this.targetView }),
view: this.targetView || 'event',
target: ev.detail.target,
childIndex: ev.detail.childIndex,
})