Add support for configuration profiles.
This commit is contained in:
+9
-2
@@ -1623,7 +1623,6 @@ export type Automations = z.infer<typeof automationsSchema>;
|
||||
// *************************************************************************
|
||||
|
||||
const performanceConfigDefault = {
|
||||
profile: 'high' as const,
|
||||
features: {
|
||||
animated_progress_indicator: true,
|
||||
media_chunk_size: MEDIA_CHUNK_SIZE_DEFAULT,
|
||||
@@ -1636,7 +1635,6 @@ const performanceConfigDefault = {
|
||||
|
||||
export const performanceConfigSchema = z
|
||||
.object({
|
||||
profile: z.enum(['low', 'high']).default(performanceConfigDefault.profile),
|
||||
features: z
|
||||
.object({
|
||||
animated_progress_indicator: z
|
||||
@@ -1679,6 +1677,13 @@ export interface CardWideConfig {
|
||||
debug?: DebugConfig;
|
||||
}
|
||||
|
||||
// *************************************************************************
|
||||
// *** Profile Configuration ***
|
||||
// *************************************************************************
|
||||
const PROFILES = ['low-performance', 'scrubbing'] as const;
|
||||
export type ProfileType = (typeof PROFILES)[number];
|
||||
export const profilesSchema = z.enum(PROFILES).array().optional();
|
||||
|
||||
// *************************************************************************
|
||||
// *** Card Configuration ***
|
||||
// *************************************************************************
|
||||
@@ -1705,6 +1710,8 @@ export const frigateCardConfigSchema = z.object({
|
||||
debug: debugConfigSchema,
|
||||
automations: automationsSchema,
|
||||
|
||||
profiles: profilesSchema,
|
||||
|
||||
// Configuration overrides.
|
||||
overrides: overridesSchema,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user