mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 19:26:36 +00:00
Only show own devices when there are devices... (#25920)
only show own devices when there are devices...
This commit is contained in:
parent
df2523a6a2
commit
eb9359e9e1
@ -405,47 +405,52 @@ class HaConfigEntryRow extends LitElement {
|
||||
</ha-md-list-item>
|
||||
${this._expanded
|
||||
? subEntries.length
|
||||
? html`<ha-md-list class="devices">
|
||||
<ha-md-list-item @click=${this._toggleOwnDevices} type="button">
|
||||
<ha-icon-button
|
||||
class="expand-button"
|
||||
.path=${this._devicesExpanded
|
||||
? mdiChevronDown
|
||||
: mdiChevronUp}
|
||||
slot="start"
|
||||
? html`${ownDevices.length
|
||||
? html`<ha-md-list class="devices">
|
||||
<ha-md-list-item
|
||||
@click=${this._toggleOwnDevices}
|
||||
type="button"
|
||||
>
|
||||
</ha-icon-button>
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.integrations.config_entry.devices_without_subentry"
|
||||
)}
|
||||
</ha-md-list-item>
|
||||
${this._devicesExpanded
|
||||
? ownDevices.map(
|
||||
(device) =>
|
||||
html`<ha-config-entry-device-row
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
.entry=${item}
|
||||
.device=${device}
|
||||
.entities=${entities}
|
||||
></ha-config-entry-device-row>`
|
||||
)
|
||||
: nothing}
|
||||
</ha-md-list>
|
||||
${subEntries.map(
|
||||
(subEntry) => html`
|
||||
<ha-config-sub-entry-row
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
.manifest=${this.manifest}
|
||||
.diagnosticHandler=${this.diagnosticHandler}
|
||||
.entities=${this.entities}
|
||||
.entry=${item}
|
||||
.subEntry=${subEntry}
|
||||
data-entry-id=${item.entry_id}
|
||||
></ha-config-sub-entry-row>
|
||||
`
|
||||
)}`
|
||||
<ha-icon-button
|
||||
class="expand-button"
|
||||
.path=${this._devicesExpanded
|
||||
? mdiChevronDown
|
||||
: mdiChevronUp}
|
||||
slot="start"
|
||||
>
|
||||
</ha-icon-button>
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.integrations.config_entry.devices_without_subentry"
|
||||
)}
|
||||
</ha-md-list-item>
|
||||
${this._devicesExpanded
|
||||
? ownDevices.map(
|
||||
(device) =>
|
||||
html`<ha-config-entry-device-row
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
.entry=${item}
|
||||
.device=${device}
|
||||
.entities=${entities}
|
||||
></ha-config-entry-device-row>`
|
||||
)
|
||||
: nothing}
|
||||
</ha-md-list>`
|
||||
: nothing}
|
||||
${subEntries.map(
|
||||
(subEntry) => html`
|
||||
<ha-config-sub-entry-row
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
.manifest=${this.manifest}
|
||||
.diagnosticHandler=${this.diagnosticHandler}
|
||||
.entities=${this.entities}
|
||||
.entry=${item}
|
||||
.subEntry=${subEntry}
|
||||
data-entry-id=${item.entry_id}
|
||||
></ha-config-sub-entry-row>
|
||||
`
|
||||
)}`
|
||||
: html`
|
||||
${ownDevices.map(
|
||||
(device) =>
|
||||
|
@ -541,8 +541,9 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
|
||||
<ha-button
|
||||
slot="action"
|
||||
@click=${this._handleDisableDebugLogging}
|
||||
>${this.hass.localize("ui.common.disable")}</ha-button
|
||||
>
|
||||
${this.hass.localize("ui.common.disable")}
|
||||
</ha-button>
|
||||
</ha-alert>
|
||||
</div>`
|
||||
: nothing}
|
||||
|
Loading…
x
Reference in New Issue
Block a user