Promote thumbnail carousel selected to a property.

This commit is contained in:
Dermot Duffy
2022-09-25 17:50:40 -07:00
parent 2f34d6e7fa
commit 56465e4f92
3 changed files with 23 additions and 19 deletions
+7 -2
View File
@@ -681,7 +681,9 @@ export class FrigateCardTimelineCore extends LitElement {
const window = this._timeline?.getWindow();
if (window) {
if (properties.group) {
this._changeViewToRecording(window.end, String(properties.group));
this._changeViewToRecording(
properties.what === 'background' ? properties.time : window.end,
String(properties.group));
} else if (this.mini && this.view?.camera) {
// In mini mode group may not be displayed / used, so just use the camera directly.
this._changeViewToRecording(window.end, this.view.camera);
@@ -812,7 +814,10 @@ export class FrigateCardTimelineCore extends LitElement {
: this._timeline.getSelection();
let childIndex = -1;
const children: FrigateBrowseMediaSource[] = [];
this._dataview?.get({ order: sortTimelineItemsYoungestToOldest }).forEach((item) => {
this._dataview?.get({
filter: (item) => item.type !== 'background',
order: sortTimelineItemsYoungestToOldest }
).forEach((item) => {
const cameraID = item.group ? String(item.group) : null;
const cameraConfig = cameraID ? this.cameras?.get(cameraID) : null;
const event = item.event;