mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 10:16:46 +00:00
Only show Card Content if OS exist (#12513)
This commit is contained in:
parent
3438912ba5
commit
f510e2a8e0
@ -76,13 +76,13 @@ class HaConfigHardware extends LitElement {
|
|||||||
>
|
>
|
||||||
`
|
`
|
||||||
: ""}
|
: ""}
|
||||||
${this._OSData && this._hostData
|
${this._OSData || this._hostData
|
||||||
? html`
|
? html`
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<ha-card outlined>
|
<ha-card outlined>
|
||||||
<div class="card-content">
|
${this._OSData?.board
|
||||||
${this._OSData?.board
|
? html`
|
||||||
? html`
|
<div class="card-content">
|
||||||
<ha-settings-row>
|
<ha-settings-row>
|
||||||
<span slot="heading"
|
<span slot="heading"
|
||||||
>${BOARD_NAMES[this._OSData.board] ||
|
>${BOARD_NAMES[this._OSData.board] ||
|
||||||
@ -94,35 +94,39 @@ class HaConfigHardware extends LitElement {
|
|||||||
<span class="value">${this._OSData.board}</span>
|
<span class="value">${this._OSData.board}</span>
|
||||||
</div>
|
</div>
|
||||||
</ha-settings-row>
|
</ha-settings-row>
|
||||||
`
|
</div>
|
||||||
: ""}
|
`
|
||||||
</div>
|
: ""}
|
||||||
<div class="card-actions">
|
${this._hostData
|
||||||
${this._hostData.features.includes("reboot")
|
? html`
|
||||||
? html`
|
<div class="card-actions">
|
||||||
<ha-progress-button
|
${this._hostData.features.includes("reboot")
|
||||||
class="warning"
|
? html`
|
||||||
@click=${this._hostReboot}
|
<ha-progress-button
|
||||||
>
|
class="warning"
|
||||||
${this.hass.localize(
|
@click=${this._hostReboot}
|
||||||
"ui.panel.config.hardware.reboot_host"
|
>
|
||||||
)}
|
${this.hass.localize(
|
||||||
</ha-progress-button>
|
"ui.panel.config.hardware.reboot_host"
|
||||||
`
|
)}
|
||||||
: ""}
|
</ha-progress-button>
|
||||||
${this._hostData.features.includes("shutdown")
|
`
|
||||||
? html`
|
: ""}
|
||||||
<ha-progress-button
|
${this._hostData.features.includes("shutdown")
|
||||||
class="warning"
|
? html`
|
||||||
@click=${this._hostShutdown}
|
<ha-progress-button
|
||||||
>
|
class="warning"
|
||||||
${this.hass.localize(
|
@click=${this._hostShutdown}
|
||||||
"ui.panel.config.hardware.shutdown_host"
|
>
|
||||||
)}
|
${this.hass.localize(
|
||||||
</ha-progress-button>
|
"ui.panel.config.hardware.shutdown_host"
|
||||||
`
|
)}
|
||||||
: ""}
|
</ha-progress-button>
|
||||||
</div>
|
`
|
||||||
|
: ""}
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
: ""}
|
||||||
</ha-card>
|
</ha-card>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user