Add favorite icon to gallery

This commit is contained in:
Nick Mowen
2022-03-20 17:41:47 -06:00
parent ca837774bf
commit 57afd5cdda
3 changed files with 13 additions and 3 deletions
+4 -1
View File
@@ -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>`,
+9
View File
@@ -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: 12%;
left: 90%;
color: yellow;
} }
-2
View File
@@ -7,8 +7,6 @@
flex: 0 0 var(--frigate-card-carousel-thumbnail-size); flex: 0 0 var(--frigate-card-carousel-thumbnail-size);
opacity: var(--frigate-card-carousel-thumbnail-opacity); opacity: var(--frigate-card-carousel-thumbnail-opacity);
transition: opacity 0.6s ease, transform 0.2s linear; transition: opacity 0.6s ease, transform 0.2s linear;
position: relative;
display: inline-block;
} }
.embla__slide.slide-selected { .embla__slide.slide-selected {
opacity: 1.0; opacity: 1.0;