Add initial keyboard shortcut support.

This commit is contained in:
Dermot Duffy
2024-06-05 21:44:17 -07:00
parent 904f6d8142
commit 7ab545738d
186 changed files with 9564 additions and 3658 deletions
+12 -1
View File
@@ -5,9 +5,10 @@ import {
format,
} from 'date-fns';
import { StyleInfo } from 'lit/directives/style-map';
import { round } from 'lodash-es';
import isEqualWith from 'lodash-es/isEqualWith';
import mergeWith from 'lodash-es/mergeWith';
import round from 'lodash-es/round';
import uniq from 'lodash-es/uniq';
import { FrigateCardError } from '../types';
export type ModifyInterface<T, R> = Omit<T, keyof R> & R;
@@ -254,6 +255,16 @@ export const recursivelyMergeObjectsNotArrays = <T>(target: T, src1: T, src2: T)
return mergeWith(target, src1, src2, (_a, b) => (Array.isArray(b) ? b : undefined));
};
export const recursivelyMergeObjectsConcatenatingArraysUniquely = <T>(
target: T,
src1: T,
src2: T,
): T => {
return mergeWith(target, src1, src2, (a, b) =>
Array.isArray(a) ? uniq(a.concat(b)) : undefined,
);
};
export const aspectRatioToString = (options?: {
ratio?: number[];
defaultStatic?: boolean;