Show all cameras on timeline in grid mode.

This commit is contained in:
Dermot Duffy
2023-08-13 15:31:10 -07:00
parent c665f1b351
commit 5364c828eb
2 changed files with 6 additions and 8 deletions
+4 -8
View File
@@ -8,7 +8,6 @@ import {
} from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { CameraManager } from '../camera-manager/manager.js';
import type { DataQuery } from '../camera-manager/types';
import basicBlockStyle from '../scss/basic-block.scss';
import {
CardWideConfig,
@@ -139,15 +138,12 @@ export class FrigateCardSurround extends LitElement {
return null;
}
if (this.view?.is('live')) {
return getAllDependentCameras(this.cameraManager, this.view.camera);
return this.view.isGrid()
? this.cameraManager?.getStore().getVisibleCameraIDs() ?? null
: getAllDependentCameras(this.cameraManager, this.view.camera);
}
if (this.view.isViewerView()) {
return new Set(
this.view.query
?.getQueries()
?.map((query: DataQuery) => [...query.cameraIDs])
.flat(),
);
return this.view.query?.getQueryCameraIDs() ?? null;
}
return null;
}
+2
View File
@@ -496,8 +496,10 @@ export class FrigateCardTimelineCore extends LitElement {
: 'media'
: this.view.view;
const selectedCamera = newResults?.getSelectedResult()?.getCameraID();
this.view
.evolve({
...(selectedCamera && { camera: selectedCamera }),
view: desiredView,
queryResults: newResults,
}) // Whether or not to set the timeline window.