Allow finer grained selection of thumbnail controls.

This commit is contained in:
Dermot Duffy
2022-07-03 09:28:56 -07:00
parent 771943cb6b
commit 56362c3fb9
11 changed files with 261 additions and 94 deletions
+6 -3
View File
@@ -129,7 +129,10 @@ export class FrigateCardThumbnail extends LitElement {
public details = false;
@property({ attribute: true, type: Boolean })
public controls = false;
public show_favorite_control = false;
@property({ attribute: true, type: Boolean })
public show_timeline_control = false;
// ============================
// Data-binding based interface
@@ -211,7 +214,7 @@ export class FrigateCardThumbnail extends LitElement {
title="${label ?? ''}"
.date=${recording ? fromUnixTime(recording.start_time) : undefined}
></frigate-card-thumbnail-feature-recording>`}
${this.controls && event && this.hass && this.clientID
${this.show_favorite_control && event && this.hass && this.clientID
? html` <ha-icon
class="${classMap(starClasses)}"
icon=${event?.retain_indefinitely ? 'mdi:star' : 'mdi:star-outline'}
@@ -247,7 +250,7 @@ export class FrigateCardThumbnail extends LitElement {
.recording=${recording ?? undefined}
></frigate-card-thumbnail-details-recording>`
: html``}
${this.controls
${this.show_timeline_control
? html`<ha-icon
class="timeline"
icon="mdi:target"