diff --git a/src/panels/config/integrations/ha-config-integration-page.ts b/src/panels/config/integrations/ha-config-integration-page.ts index 7eabbeb93e7e..2afb107fd9fe 100644 --- a/src/panels/config/integrations/ha-config-integration-page.ts +++ b/src/panels/config/integrations/ha-config-integration-page.ts @@ -47,6 +47,9 @@ import { nextRender } from "../../../common/util/render-status"; import "../../../components/ha-button"; import "../../../components/ha-card"; import "../../../components/ha-list-item"; +import "../../../components/ha-list-new"; +import "../../../components/ha-list-item-new"; +import "../../../components/ha-button-menu-new"; import { deleteApplicationCredential, fetchApplicationCredentialsConfigEntry, @@ -419,17 +422,13 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) { "ui.panel.config.integrations.discovered" )} - + ${discoveryFlows.map( (flow) => - html` + html` ${flow.localized_title} - ` + ` )} - + ` : ""} ${attentionFlows.length || attentionEntries.length @@ -449,19 +448,16 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) { `ui.panel.config.integrations.integration_page.attention_entries` )} - + ${attentionFlows.map((flow) => { const attention = ATTENTION_SOURCES.includes( flow.context.source ); - return html` ${flow.localized_title} - ${this.hass.localize( `ui.panel.config.integrations.${ attention ? "attention" : "discovered" @@ -469,7 +465,7 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) { )} - `; + `; })} ${attentionEntries.map((item) => this._renderConfigEntry(item) )} - + ` : ""} @@ -505,9 +501,9 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) { )} ` : nothing} - + ${normalEntries.map((item) => this._renderConfigEntry(item))} - +
${this._manifest?.integration_type @@ -671,41 +667,42 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) { const configPanel = this._configPanel(item.domain, this.hass.panels); - return html` - ${stateText - ? html` -
- -
${this.hass.localize(...stateText)}
- ${stateTextExtra - ? html`${stateTextExtra}` - : ""} -
- ` - : ""} ${item.title || domainToName(this.hass.localize, item.domain)} - ${devicesLine} +
+
${devicesLine}
+ ${stateText + ? html` +
+ +
+ ${this.hass.localize(...stateText)}${stateTextExtra + ? html`: ${stateTextExtra}` + : ""} +
+
+ ` + : ""} +
${item.disabled_by === "user" - ? html` + ? html` ${this.hass.localize("ui.common.enable")} ` : configPanel && (item.domain !== "matter" || isDevVersion(this.hass.config.version)) ? html` ${this.hass.localize( @@ -715,14 +712,14 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) { >` : item.supports_options && !stateText ? html` - + ${this.hass.localize( "ui.panel.config.integrations.config_entry.configure" )} ` : ""} - +
` : ""} - - `; + + `; } private async _highlightEntry() { @@ -1431,30 +1428,30 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) { ha-alert:first-of-type { margin-top: 16px; } - ha-list-item.discovered { + ha-list-item-new.discovered { --mdc-list-item-meta-size: auto; --mdc-list-item-meta-display: flex; height: 72px; } - ha-list-item.config_entry { + ha-list-item-new.config_entry { overflow: visible; --mdc-list-item-meta-size: auto; --mdc-list-item-meta-display: flex; } - ha-button-menu ha-list-item { + ha-button-menu-new ha-list-item { --mdc-list-item-meta-size: 24px; } - ha-list-item.config_entry::after { + ha-list-item-new.config_entry::after { position: absolute; - top: 0; + top: 8px; right: 0; - bottom: 0; + bottom: 8px; left: 0; opacity: 0.12; pointer-events: none; content: ""; } - ha-button-menu { + ha-button-menu-new { flex: 0; } a { @@ -1513,6 +1510,10 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) { overflow: hidden; text-overflow: ellipsis; } + ha-list-new { + margin-top: 8px; + margin-bottom: 8px; + } `, ]; }