Clearly show if there are no ignored or disabled integrations (#17251)

This commit is contained in:
Philip Allgaier 2023-07-10 13:08:15 +02:00 committed by GitHub
parent 289c380a6a
commit a1771cc919
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 20 deletions

View File

@ -383,16 +383,20 @@ class HaConfigIntegrationsDashboard extends SubscribeMixin(LitElement) {
)}
</h1>
<div class="container">
${ignoredConfigEntries.map(
(entry: ConfigEntryExtended) => html`
<ha-ignored-config-entry-card
.hass=${this.hass}
.manifest=${this._manifests[entry.domain]}
.entry=${entry}
@change=${this._handleFlowUpdated}
></ha-ignored-config-entry-card>
`
)}
${ignoredConfigEntries.length > 0
? ignoredConfigEntries.map(
(entry: ConfigEntryExtended) => html`
<ha-ignored-config-entry-card
.hass=${this.hass}
.manifest=${this._manifests[entry.domain]}
.entry=${entry}
@change=${this._handleFlowUpdated}
></ha-ignored-config-entry-card>
`
)
: html`${this.hass.localize(
"ui.panel.config.integrations.no_ignored_integrations"
)}`}
</div>`
: ""}
${configEntriesInProgress.length
@ -417,16 +421,20 @@ class HaConfigIntegrationsDashboard extends SubscribeMixin(LitElement) {
${this.hass.localize("ui.panel.config.integrations.disabled")}
</h1>
<div class="container">
${disabledConfigEntries.map(
(entry: ConfigEntryExtended) => html`
<ha-disabled-config-entry-card
.hass=${this.hass}
.entry=${entry}
.manifest=${this._manifests[entry.domain]}
.entityRegistryEntries=${this._entityRegistryEntries}
></ha-disabled-config-entry-card>
`
)}
${disabledConfigEntries.length > 0
? disabledConfigEntries.map(
(entry: ConfigEntryExtended) => html`
<ha-disabled-config-entry-card
.hass=${this.hass}
.entry=${entry}
.manifest=${this._manifests[entry.domain]}
.entityRegistryEntries=${this._entityRegistryEntries}
></ha-disabled-config-entry-card>
`
)
: html`${this.hass.localize(
"ui.panel.config.integrations.no_disabled_integrations"
)}`}
</div>`
: ""}
${configEntriesInProgress.length ||

View File

@ -3377,6 +3377,8 @@
"confirm_new": "Do you want to set up {integration}?",
"add_integration": "Add integration",
"no_integrations": "Seems like you don't have any integrations configured yet. Click on the button below to add your first integration!",
"no_disabled_integrations": "No disabled integrations",
"no_ignored_integrations": "No ignored integrations",
"note_about_integrations": "No integrations matched your search, the integration you want to set up might not be available to set up via the UI yet.",
"note_about_website_reference": "More are available on the ",
"home_assistant_website": "Home Assistant website",