Merge pull request #489 from NickM-27/favorite-clips
Add favorite icon for clips that are retained
This commit is contained in:
@@ -218,7 +218,10 @@ export class FrigateCardGalleryCore extends LitElement {
|
|||||||
}
|
}
|
||||||
stopEventFromActivatingCardWideActions(ev);
|
stopEventFromActivatingCardWideActions(ev);
|
||||||
}}
|
}}
|
||||||
/>`
|
/>${child.frigate?.event?.retain_indefinitely ? html`<ha-icon
|
||||||
|
class="favorite"
|
||||||
|
icon="mdi:star"
|
||||||
|
/>` : ``}`
|
||||||
: ``}
|
: ``}
|
||||||
</div>
|
</div>
|
||||||
</li>`,
|
</li>`,
|
||||||
|
|||||||
@@ -127,6 +127,11 @@ export class FrigateCardThumbnailCarousel extends FrigateCardCarousel {
|
|||||||
src="${mediaToRender.thumbnail}"
|
src="${mediaToRender.thumbnail}"
|
||||||
title="${mediaToRender.title}"
|
title="${mediaToRender.title}"
|
||||||
/>
|
/>
|
||||||
|
${mediaToRender?.frigate?.event?.retain_indefinitely ? html`
|
||||||
|
<ha-icon
|
||||||
|
class="favorite"
|
||||||
|
icon="mdi:star"
|
||||||
|
/>` : ``}
|
||||||
</div>`;
|
</div>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,4 +43,13 @@ ha-card.frigate-card-gallery-folder {
|
|||||||
padding: 10px;
|
padding: 10px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
|
}
|
||||||
|
.favorite {
|
||||||
|
position: absolute;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
height: 24px;
|
||||||
|
width: 24px;
|
||||||
|
top: 10%;
|
||||||
|
left: 90%;
|
||||||
|
color: yellow;
|
||||||
}
|
}
|
||||||
@@ -25,4 +25,13 @@
|
|||||||
// Restrict images to a maximum of thumbnail size.
|
// Restrict images to a maximum of thumbnail size.
|
||||||
max-width: var(--frigate-card-carousel-thumbnail-size);
|
max-width: var(--frigate-card-carousel-thumbnail-size);
|
||||||
max-height: 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;
|
||||||
}
|
}
|
||||||
@@ -946,6 +946,7 @@ export interface FrigateBrowseMediaSource extends BrowseMediaSource {
|
|||||||
start_time: number;
|
start_time: number;
|
||||||
top_score: number;
|
top_score: number;
|
||||||
zones: string[];
|
zones: string[];
|
||||||
|
retain_indefinitely: boolean;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -975,6 +976,7 @@ export const frigateBrowseMediaSourceSchema: z.ZodSchema<BrowseMediaSource> = z.
|
|||||||
start_time: z.number(),
|
start_time: z.number(),
|
||||||
top_score: z.number(),
|
top_score: z.number(),
|
||||||
zones: z.string().array(),
|
zones: z.string().array(),
|
||||||
|
retain_indefinitely: z.boolean(),
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
.optional(),
|
.optional(),
|
||||||
|
|||||||
Reference in New Issue
Block a user