Only show Card Content if OS exist (#12513)

This commit is contained in:
Zack Barett 2022-04-29 09:49:47 -05:00 committed by GitHub
parent 3438912ba5
commit f510e2a8e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,9 +94,11 @@ 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> ${this._hostData
? html`
<div class="card-actions"> <div class="card-actions">
${this._hostData.features.includes("reboot") ${this._hostData.features.includes("reboot")
? html` ? html`
@ -123,6 +125,8 @@ class HaConfigHardware extends LitElement {
` `
: ""} : ""}
</div> </div>
`
: ""}
</ha-card> </ha-card>
</div> </div>
` `