diff --git a/src/components/gallery.ts b/src/components/gallery.ts
index 21d26fd8..4428681a 100644
--- a/src/components/gallery.ts
+++ b/src/components/gallery.ts
@@ -218,7 +218,10 @@ export class FrigateCardGalleryCore extends LitElement {
}
stopEventFromActivatingCardWideActions(ev);
}}
- />`
+ />${child.frigate?.event?.retain_indefinitely ? html`` : ``}`
: ``}
`,
diff --git a/src/components/thumbnail-carousel.ts b/src/components/thumbnail-carousel.ts
index 7ad9dd18..3110a020 100644
--- a/src/components/thumbnail-carousel.ts
+++ b/src/components/thumbnail-carousel.ts
@@ -127,6 +127,11 @@ export class FrigateCardThumbnailCarousel extends FrigateCardCarousel {
src="${mediaToRender.thumbnail}"
title="${mediaToRender.title}"
/>
+ ${mediaToRender?.frigate?.event?.retain_indefinitely ? html`
+ ` : ``}
`;
}
diff --git a/src/scss/gallery.scss b/src/scss/gallery.scss
index 5f367850..03ad3fdd 100644
--- a/src/scss/gallery.scss
+++ b/src/scss/gallery.scss
@@ -43,4 +43,13 @@ ha-card.frigate-card-gallery-folder {
padding: 10px;
height: 100%;
line-height: 1;
+}
+.favorite {
+ position: absolute;
+ transform: translate(-50%, -50%);
+ height: 24px;
+ width: 24px;
+ top: 10%;
+ left: 90%;
+ color: yellow;
}
\ No newline at end of file
diff --git a/src/scss/thumbnail-carousel.scss b/src/scss/thumbnail-carousel.scss
index 22055ca5..d8d3ca67 100644
--- a/src/scss/thumbnail-carousel.scss
+++ b/src/scss/thumbnail-carousel.scss
@@ -25,4 +25,13 @@
// Restrict images to a maximum of thumbnail size.
max-width: var(--frigate-card-carousel-thumbnail-size);
max-height: var(--frigate-card-carousel-thumbnail-size);
+}
+.favorite {
+ position: absolute;
+ transform: translate(-50%, -50%);
+ height: 24px;
+ width: 24px;
+ top: 12%;
+ left: 90%;
+ color: yellow;
}
\ No newline at end of file
diff --git a/src/types.ts b/src/types.ts
index 73856a39..6aeb65b3 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -946,6 +946,7 @@ export interface FrigateBrowseMediaSource extends BrowseMediaSource {
start_time: number;
top_score: number;
zones: string[];
+ retain_indefinitely: boolean;
};
};
}
@@ -975,6 +976,7 @@ export const frigateBrowseMediaSourceSchema: z.ZodSchema = z.
start_time: z.number(),
top_score: z.number(),
zones: z.string().array(),
+ retain_indefinitely: z.boolean(),
}),
})
.optional(),