mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Fix integration configure on failed setup (#22407)
* Fix integration configure button when setup failed * Use ha-button instead of mwc-button in ha-config-integration-page
This commit is contained in:
parent
4509661652
commit
206fbac618
@ -772,27 +772,29 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
|
|||||||
: ""}
|
: ""}
|
||||||
</div>
|
</div>
|
||||||
${item.disabled_by === "user"
|
${item.disabled_by === "user"
|
||||||
? html`<mwc-button unelevated slot="end" @click=${this._handleEnable}>
|
? html`<ha-button unelevated slot="end" @click=${this._handleEnable}>
|
||||||
${this.hass.localize("ui.common.enable")}
|
${this.hass.localize("ui.common.enable")}
|
||||||
</mwc-button>`
|
</ha-button>`
|
||||||
: configPanel &&
|
: configPanel &&
|
||||||
(item.domain !== "matter" || isDevVersion(this.hass.config.version))
|
(item.domain !== "matter" ||
|
||||||
|
isDevVersion(this.hass.config.version)) &&
|
||||||
|
!stateText
|
||||||
? html`<a
|
? html`<a
|
||||||
slot="end"
|
slot="end"
|
||||||
href=${`/${configPanel}?config_entry=${item.entry_id}`}
|
href=${`/${configPanel}?config_entry=${item.entry_id}`}
|
||||||
><mwc-button>
|
><ha-button>
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
"ui.panel.config.integrations.config_entry.configure"
|
"ui.panel.config.integrations.config_entry.configure"
|
||||||
)}
|
)}
|
||||||
</mwc-button></a
|
</ha-button></a
|
||||||
>`
|
>`
|
||||||
: item.supports_options && !stateText
|
: item.supports_options
|
||||||
? html`
|
? html`
|
||||||
<mwc-button slot="end" @click=${this._showOptions}>
|
<ha-button slot="end" @click=${this._showOptions}>
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
"ui.panel.config.integrations.config_entry.configure"
|
"ui.panel.config.integrations.config_entry.configure"
|
||||||
)}
|
)}
|
||||||
</mwc-button>
|
</ha-button>
|
||||||
`
|
`
|
||||||
: ""}
|
: ""}
|
||||||
<ha-md-button-menu positioning="popover" slot="end">
|
<ha-md-button-menu positioning="popover" slot="end">
|
||||||
@ -801,14 +803,6 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
|
|||||||
.label=${this.hass.localize("ui.common.menu")}
|
.label=${this.hass.localize("ui.common.menu")}
|
||||||
.path=${mdiDotsVertical}
|
.path=${mdiDotsVertical}
|
||||||
></ha-icon-button>
|
></ha-icon-button>
|
||||||
${item.supports_options && stateText
|
|
||||||
? html`<ha-md-menu-item @click=${this._showOptions}>
|
|
||||||
<ha-svg-icon slot="start" .path=${mdiCog}></ha-svg-icon>
|
|
||||||
${this.hass.localize(
|
|
||||||
"ui.panel.config.integrations.config_entry.configure"
|
|
||||||
)}
|
|
||||||
</ha-md-menu-item>`
|
|
||||||
: ""}
|
|
||||||
${item.disabled_by && devices.length
|
${item.disabled_by && devices.length
|
||||||
? html`
|
? html`
|
||||||
<ha-md-menu-item
|
<ha-md-menu-item
|
||||||
|
Loading…
x
Reference in New Issue
Block a user