Fix logs overflow when there are 0 boots (#22694)

This commit is contained in:
Wendelin 2024-11-06 13:19:17 +01:00 committed by GitHub
parent 04a45a4361
commit ed3096157c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -242,19 +242,23 @@ class ErrorLogCard extends LitElement {
.label=${this.hass.localize("ui.common.refresh")}
></ha-icon-button>`
: nothing}
<ha-button-menu @action=${this._handleOverflowAction}>
<ha-icon-button slot="trigger" .path=${mdiDotsVertical}>
</ha-icon-button>
<ha-list-item graphic="icon">
<ha-svg-icon
slot="graphic"
.path=${mdiFormatListNumbered}
></ha-svg-icon>
${this.hass.localize(
`ui.panel.config.logs.${this._showBootsSelect ? "hide" : "show"}_haos_boots`
)}
</ha-list-item>
</ha-button-menu>
${this._streamSupported && Array.isArray(this._boots)
? html`
<ha-button-menu @action=${this._handleOverflowAction}>
<ha-icon-button slot="trigger" .path=${mdiDotsVertical}>
</ha-icon-button>
<ha-list-item graphic="icon">
<ha-svg-icon
slot="graphic"
.path=${mdiFormatListNumbered}
></ha-svg-icon>
${this.hass.localize(
`ui.panel.config.logs.${this._showBootsSelect ? "hide" : "show"}_haos_boots`
)}
</ha-list-item>
</ha-button-menu>
`
: nothing}
</div>
</div>
<div class="card-content error-log">