mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-24 13:27:22 +00:00
Prettier Fixes
This commit is contained in:
parent
698beedaa2
commit
35941a58a5
@ -62,7 +62,8 @@ class HuiGlanceCard extends HassLocalizeLitMixin(LitElement)
|
||||
}
|
||||
}
|
||||
|
||||
const columnWidth = config.entities.length > 4 ? "20%" : `${100 / config.entities.length}%`
|
||||
const columnWidth =
|
||||
config.entities.length > 4 ? "20%" : `${100 / config.entities.length}%`;
|
||||
|
||||
this.style.setProperty(
|
||||
"--glance-column-width",
|
||||
@ -98,10 +99,10 @@ class HuiGlanceCard extends HassLocalizeLitMixin(LitElement)
|
||||
<ha-card .header="${title}">
|
||||
<div class="entities ${classMap({ "no-header": !title })}">
|
||||
${repeat<EntityConfig>(
|
||||
entities,
|
||||
(entityConf) => entityConf.entity,
|
||||
(entityConf) => this.renderEntity(entityConf)
|
||||
)}
|
||||
entities,
|
||||
(entityConf) => entityConf.entity,
|
||||
(entityConf) => this.renderEntity(entityConf)
|
||||
)}
|
||||
</div>
|
||||
</ha-card>
|
||||
`;
|
||||
@ -160,23 +161,23 @@ class HuiGlanceCard extends HassLocalizeLitMixin(LitElement)
|
||||
@click="${this.handleClick}"
|
||||
>
|
||||
${
|
||||
this.config!.show_name !== false
|
||||
? html`<div class="name">${
|
||||
"name" in entityConf
|
||||
? entityConf.name
|
||||
: computeStateName(stateObj)
|
||||
}</div>`
|
||||
: ""
|
||||
}
|
||||
this.config!.show_name !== false
|
||||
? html`<div class="name">${
|
||||
"name" in entityConf
|
||||
? entityConf.name
|
||||
: computeStateName(stateObj)
|
||||
}</div>`
|
||||
: ""
|
||||
}
|
||||
<state-badge
|
||||
.stateObj="${stateObj}"
|
||||
.overrideIcon="${entityConf.icon}"
|
||||
></state-badge>
|
||||
${
|
||||
this.config!.show_state !== false
|
||||
? html`<div>${computeStateDisplay(this.localize, stateObj)}</div>`
|
||||
: ""
|
||||
}
|
||||
this.config!.show_state !== false
|
||||
? html`<div>${computeStateDisplay(this.localize, stateObj)}</div>`
|
||||
: ""
|
||||
}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user