Show all cameras on timeline in grid mode.
This commit is contained in:
@@ -8,7 +8,6 @@ import {
|
|||||||
} from 'lit';
|
} from 'lit';
|
||||||
import { customElement, property } from 'lit/decorators.js';
|
import { customElement, property } from 'lit/decorators.js';
|
||||||
import { CameraManager } from '../camera-manager/manager.js';
|
import { CameraManager } from '../camera-manager/manager.js';
|
||||||
import type { DataQuery } from '../camera-manager/types';
|
|
||||||
import basicBlockStyle from '../scss/basic-block.scss';
|
import basicBlockStyle from '../scss/basic-block.scss';
|
||||||
import {
|
import {
|
||||||
CardWideConfig,
|
CardWideConfig,
|
||||||
@@ -139,15 +138,12 @@ export class FrigateCardSurround extends LitElement {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (this.view?.is('live')) {
|
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()) {
|
if (this.view.isViewerView()) {
|
||||||
return new Set(
|
return this.view.query?.getQueryCameraIDs() ?? null;
|
||||||
this.view.query
|
|
||||||
?.getQueries()
|
|
||||||
?.map((query: DataQuery) => [...query.cameraIDs])
|
|
||||||
.flat(),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -496,8 +496,10 @@ export class FrigateCardTimelineCore extends LitElement {
|
|||||||
: 'media'
|
: 'media'
|
||||||
: this.view.view;
|
: this.view.view;
|
||||||
|
|
||||||
|
const selectedCamera = newResults?.getSelectedResult()?.getCameraID();
|
||||||
this.view
|
this.view
|
||||||
.evolve({
|
.evolve({
|
||||||
|
...(selectedCamera && { camera: selectedCamera }),
|
||||||
view: desiredView,
|
view: desiredView,
|
||||||
queryResults: newResults,
|
queryResults: newResults,
|
||||||
}) // Whether or not to set the timeline window.
|
}) // Whether or not to set the timeline window.
|
||||||
|
|||||||
Reference in New Issue
Block a user