Add a refresh loop for the image view itself.

This commit is contained in:
Dermot Duffy
2022-01-19 19:27:23 -08:00
parent aa0ee88970
commit 317a262f2b
6 changed files with 103 additions and 23 deletions
+7 -1
View File
@@ -390,12 +390,17 @@ const viewConfigSchema = z
/**
* Image view configuration section.
*/
const imageConfigDefault = {
refresh_seconds: 0,
};
const imageConfigSchema = z
.object({
src: z.string().optional(),
refresh_seconds: z.number().min(0).default(imageConfigDefault.refresh_seconds)
})
.merge(actionsSchema)
.optional();
.default(imageConfigDefault);
export type ImageViewConfig = z.infer<typeof imageConfigSchema>;
/**
@@ -710,6 +715,7 @@ export const frigateCardConfigDefaults = {
live: liveConfigDefault,
event_viewer: viewerConfigDefault,
event_gallery: galleryConfigDefault,
image: imageConfigDefault,
};
const menuButtonSchema = z.union([