Only show stage bage if not stable (#6546)

This commit is contained in:
Joakim Sørensen 2020-08-06 17:50:46 +02:00 committed by GitHub
parent bbb1468439
commit b29a700d40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -242,19 +242,23 @@ class HassioAddonInfo extends LitElement {
`
: ""}
<div class="security">
<ha-label-badge
class=${classMap({
green: this.addon.stage === "stable",
yellow: this.addon.stage === "experimental",
red: this.addon.stage === "deprecated",
})}
@click=${this._showMoreInfo}
id="stage"
label="stage"
description=""
>
<ha-svg-icon .path=${STAGE_ICON[this.addon.stage]}></ha-svg-icon>
</ha-label-badge>
${this.addon.stage !== "stable"
? html` <ha-label-badge
class=${classMap({
yellow: this.addon.stage === "experimental",
red: this.addon.stage === "deprecated",
})}
@click=${this._showMoreInfo}
id="stage"
label="stage"
description=""
>
<ha-svg-icon
.path=${STAGE_ICON[this.addon.stage]}
></ha-svg-icon>
</ha-label-badge>`
: ""}
<ha-label-badge
class=${classMap({
green: [5, 6].includes(Number(this.addon.rating)),