mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-30 04:36:36 +00:00
parent
ff4d5265c5
commit
e062940639
@ -164,7 +164,7 @@ export class HuiMediaControlCard extends LitElement implements LovelaceCard {
|
|||||||
const imageStyle = {
|
const imageStyle = {
|
||||||
"background-image": `url(${this.hass.hassUrl(this._image)})`,
|
"background-image": `url(${this.hass.hassUrl(this._image)})`,
|
||||||
width: `${this._cardHeight}px`,
|
width: `${this._cardHeight}px`,
|
||||||
"background-color": `${this._backgroundColor}`,
|
"background-color": this._backgroundColor || "",
|
||||||
};
|
};
|
||||||
|
|
||||||
const gradientStyle = {
|
const gradientStyle = {
|
||||||
@ -190,11 +190,15 @@ export class HuiMediaControlCard extends LitElement implements LovelaceCard {
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="color-block"
|
class="color-block"
|
||||||
style=${styleMap({ "background-color": this._backgroundColor! })}
|
style=${styleMap({
|
||||||
|
"background-color": this._backgroundColor || "",
|
||||||
|
})}
|
||||||
></div>
|
></div>
|
||||||
<div
|
<div
|
||||||
class="no-img"
|
class="no-img"
|
||||||
style=${styleMap({ "background-color": this._backgroundColor! })}
|
style=${styleMap({
|
||||||
|
"background-color": this._backgroundColor || "",
|
||||||
|
})}
|
||||||
></div>
|
></div>
|
||||||
<div class="image" style=${styleMap(imageStyle)}></div>
|
<div class="image" style=${styleMap(imageStyle)}></div>
|
||||||
${hasNoImage
|
${hasNoImage
|
||||||
@ -213,7 +217,7 @@ export class HuiMediaControlCard extends LitElement implements LovelaceCard {
|
|||||||
off: isOffState || isUnavailable,
|
off: isOffState || isUnavailable,
|
||||||
"no-progress": !this._showProgressBar && !this._veryNarrow,
|
"no-progress": !this._showProgressBar && !this._veryNarrow,
|
||||||
})}"
|
})}"
|
||||||
style=${styleMap({ color: this._foregroundColor! })}
|
style=${styleMap({ color: this._foregroundColor || "" })}
|
||||||
>
|
>
|
||||||
<div class="top-info">
|
<div class="top-info">
|
||||||
<div class="icon-name">
|
<div class="icon-name">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user