Bump prettier to v3 and format all files
This commit is contained in:
@@ -34,7 +34,6 @@ export const keyboardShortcutsSchema = z.object({
|
||||
});
|
||||
export type KeyboardShortcuts = z.infer<typeof keyboardShortcutsSchema>;
|
||||
|
||||
|
||||
const KEYBOARD_SHORTCUT_PTZ_NAMES = [
|
||||
'ptz_down',
|
||||
'ptz_home',
|
||||
|
||||
@@ -722,8 +722,8 @@ const UPGRADES = [
|
||||
data === 'all'
|
||||
? ['selected', 'visible', 'microphone']
|
||||
: data === 'never'
|
||||
? null
|
||||
: arrayify(data),
|
||||
? null
|
||||
: arrayify(data),
|
||||
),
|
||||
upgradeWithOverrides('media_viewer.auto_play', (data) =>
|
||||
data === 'all' ? null : data === 'never' ? [] : arrayify(data),
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
import { getConfigValue, setConfigValue } from '../management.js';
|
||||
import {
|
||||
ProfileType,
|
||||
RawFrigateCardConfig,
|
||||
frigateCardConfigSchema,
|
||||
} from '../types.js';
|
||||
import { ProfileType, RawFrigateCardConfig, frigateCardConfigSchema } from '../types.js';
|
||||
import { deepRemoveDefaults } from '../../utils/zod.js';
|
||||
import { LOW_PERFORMANCE_PROFILE } from './low-performance.js';
|
||||
import { SCRUBBING_PROFILE } from './scrubbing.js';
|
||||
|
||||
const PROFILES = {
|
||||
'low-performance': LOW_PERFORMANCE_PROFILE,
|
||||
'scrubbing': SCRUBBING_PROFILE,
|
||||
scrubbing: SCRUBBING_PROFILE,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
+9
-11
@@ -737,9 +737,7 @@ const ptzCameraConfigDefaults = {
|
||||
// service data as actions for each PTZ action, and it will be preprocessed
|
||||
// into the full form. This also provides compatability with the AlexIT/WebRTC
|
||||
// PTZ configuration.
|
||||
const dataPTZFormatToFullFormat = function (
|
||||
suffix: string,
|
||||
): (data: unknown) => unknown {
|
||||
const dataPTZFormatToFullFormat = function (suffix: string): (data: unknown) => unknown {
|
||||
return (data) => {
|
||||
if (!data || typeof data !== 'object' || !data['service']) {
|
||||
return data;
|
||||
@@ -1545,9 +1543,7 @@ export const menuConfigSchema = z
|
||||
camera_ui: visibleButtonSchema.default(menuConfigDefault.buttons.camera_ui),
|
||||
cameras: visibleButtonSchema.default(menuConfigDefault.buttons.cameras),
|
||||
clips: visibleButtonSchema.default(menuConfigDefault.buttons.clips),
|
||||
ptz_home: hiddenButtonSchema.default(
|
||||
menuConfigDefault.buttons.ptz_home,
|
||||
),
|
||||
ptz_home: hiddenButtonSchema.default(menuConfigDefault.buttons.ptz_home),
|
||||
display_mode: visibleButtonSchema.default(
|
||||
menuConfigDefault.buttons.display_mode,
|
||||
),
|
||||
@@ -1608,7 +1604,7 @@ const viewerConfigDefault = {
|
||||
ptz: {
|
||||
...ptzControlsDefaults,
|
||||
mode: 'off' as const,
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1658,10 +1654,12 @@ const viewerConfigSchema = z
|
||||
next_previous: viewerNextPreviousControlConfigSchema.default(
|
||||
viewerConfigDefault.controls.next_previous,
|
||||
),
|
||||
ptz: ptzControlsConfigSchema.extend({
|
||||
// The media_viewer ptz has no 'auto' mode.
|
||||
mode: z.enum(['off', 'on']).default(viewerConfigDefault.controls.ptz.mode),
|
||||
}).default(viewerConfigDefault.controls.ptz),
|
||||
ptz: ptzControlsConfigSchema
|
||||
.extend({
|
||||
// The media_viewer ptz has no 'auto' mode.
|
||||
mode: z.enum(['off', 'on']).default(viewerConfigDefault.controls.ptz.mode),
|
||||
})
|
||||
.default(viewerConfigDefault.controls.ptz),
|
||||
thumbnails: thumbnailsControlSchema.default(
|
||||
viewerConfigDefault.controls.thumbnails,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user