From 90807be6f71e1281e92d7c5f23624649036136ea Mon Sep 17 00:00:00 2001 From: Dermot Duffy Date: Mon, 6 Sep 2021 20:43:13 -0700 Subject: [PATCH 1/4] Refactor css. --- src/frigate-hass-card.ts | 32 +++++++++++++------------------- src/scss/card.scss | 23 ++++------------------- 2 files changed, 17 insertions(+), 38 deletions(-) diff --git a/src/frigate-hass-card.ts b/src/frigate-hass-card.ts index bb3c9b44..7c0973db 100644 --- a/src/frigate-hass-card.ts +++ b/src/frigate-hass-card.ts @@ -512,7 +512,7 @@ export class FrigateCard extends LitElement { icon: string, message: string | TemplateResult | null = null, ): TemplateResult { - return html`
+ return html`
${message ? html` ${message}` : ''} @@ -737,12 +737,12 @@ export class FrigateCard extends LitElement { 'frigate-media-controls': true, previous: previous, next: !previous, - thumbnails: ( + thumbnails: !this.config.controls?.nextprev || - this.config.controls?.nextprev === "thumbnails"), - chevrons: this.config.controls?.nextprev === "chevrons", - button: this.config.controls?.nextprev === "chevrons", - } + this.config.controls?.nextprev === 'thumbnails', + chevrons: this.config.controls?.nextprev === 'chevrons', + button: this.config.controls?.nextprev === 'chevrons', + }; const clickChangeView = () => { this._view = new View({ @@ -751,7 +751,7 @@ export class FrigateCard extends LitElement { childIndex: targetChildIndex, previous: this._view, }); - } + }; if (this.config.controls?.nextprev == 'chevrons') { return html` ` : html`