Formatting pass.
This commit is contained in:
@@ -17,7 +17,7 @@ export class CameraSelectAction extends FrigateCardAction<CameraSelectActionConf
|
||||
const targetViewName =
|
||||
viewOnCameraSelect === 'current' ? view.view : viewOnCameraSelect;
|
||||
await api.getViewManager().setViewByParametersWithNewQuery({
|
||||
params:{
|
||||
params: {
|
||||
view: targetViewName,
|
||||
camera: selectCameraID,
|
||||
},
|
||||
|
||||
@@ -98,11 +98,9 @@ export class TriggersManager {
|
||||
|
||||
if (this._hasAllowableInteractionStateForAction()) {
|
||||
if (triggerAction === 'update') {
|
||||
await this._api
|
||||
.getViewManager()
|
||||
.setViewByParametersWithNewQuery({
|
||||
queryExecutorOptions: { useCache: false },
|
||||
});
|
||||
await this._api.getViewManager().setViewByParametersWithNewQuery({
|
||||
queryExecutorOptions: { useCache: false },
|
||||
});
|
||||
} else if (triggerAction === 'live') {
|
||||
await this._api.getViewManager().setViewByParametersWithNewQuery({
|
||||
params: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ViewContext } from "view";
|
||||
import { View } from "../../../view/view";
|
||||
import { ViewModifier } from "../types";
|
||||
import { ViewContext } from 'view';
|
||||
import { View } from '../../../view/view';
|
||||
import { ViewModifier } from '../types';
|
||||
|
||||
export class MergeContextViewModifier implements ViewModifier {
|
||||
protected _context?: ViewContext | null;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ViewContext } from "view";
|
||||
import { View } from "../../../view/view";
|
||||
import { ViewModifier } from "../types";
|
||||
import { ViewContext } from 'view';
|
||||
import { View } from '../../../view/view';
|
||||
import { ViewModifier } from '../types';
|
||||
|
||||
export class RemoveContextViewModifier implements ViewModifier {
|
||||
protected _keys: (keyof ViewContext)[];
|
||||
|
||||
@@ -7,4 +7,3 @@ export class SubstreamOffViewModifier implements ViewModifier {
|
||||
removeSubstream(view);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -374,7 +374,10 @@ export class FrigateCardGalleryCore extends LitElement {
|
||||
|
||||
const view = this.viewManagerEpoch?.manager.getView();
|
||||
const oldView = this.viewManagerEpoch?.oldView;
|
||||
if (!this._media || oldView?.queryResults?.getResults() !== view?.queryResults?.getResults()) {
|
||||
if (
|
||||
!this._media ||
|
||||
oldView?.queryResults?.getResults() !== view?.queryResults?.getResults()
|
||||
) {
|
||||
// Gallery places the most recent media at the top (the query results place
|
||||
// the most recent media at the end for use in the viewer). This is copied
|
||||
// to a new array to avoid reversing the query results in place.
|
||||
|
||||
+5
-2
@@ -18,9 +18,12 @@ export interface ViewParameters extends ViewEvolveParameters {
|
||||
camera: string;
|
||||
}
|
||||
|
||||
export const mergeViewContext = (a?: ViewContext | null, b?: ViewContext | null): ViewContext => {
|
||||
export const mergeViewContext = (
|
||||
a?: ViewContext | null,
|
||||
b?: ViewContext | null,
|
||||
): ViewContext => {
|
||||
return merge({}, a, b);
|
||||
}
|
||||
};
|
||||
|
||||
export class View {
|
||||
public view: FrigateCardView;
|
||||
|
||||
Reference in New Issue
Block a user