Formatting pass.

This commit is contained in:
Dermot Duffy
2024-07-30 02:23:51 -07:00
parent 8823e769a2
commit ef7b4b0ddf
12 changed files with 39 additions and 33 deletions
@@ -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,
},
+3 -5
View File
@@ -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);
}
}
+4 -1
View File
@@ -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
View File
@@ -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;