mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 01:36:49 +00:00
Hide system generated integration options (#8764)
This commit is contained in:
parent
828523f281
commit
7d63e3e088
@ -55,6 +55,10 @@ declare global {
|
||||
}
|
||||
|
||||
const integrationsWithPanel = {
|
||||
hassio: {
|
||||
buttonLocalizeKey: "ui.panel.config.hassio.button",
|
||||
path: "/hassio/dashboard",
|
||||
},
|
||||
mqtt: {
|
||||
buttonLocalizeKey: "ui.panel.config.mqtt.button",
|
||||
path: "/config/mqtt",
|
||||
@ -344,7 +348,8 @@ export class HaIntegrationCard extends LitElement {
|
||||
`}
|
||||
${!item.disabled_by &&
|
||||
item.state === "loaded" &&
|
||||
item.supports_unload
|
||||
item.supports_unload &&
|
||||
item.source !== "system"
|
||||
? html`<mwc-list-item @request-selected="${this._handleReload}">
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.integrations.config_entry.reload"
|
||||
@ -355,20 +360,24 @@ export class HaIntegrationCard extends LitElement {
|
||||
? html`<mwc-list-item @request-selected="${this._handleEnable}">
|
||||
${this.hass.localize("ui.common.enable")}
|
||||
</mwc-list-item>`
|
||||
: html`<mwc-list-item
|
||||
: item.source !== "system"
|
||||
? html`<mwc-list-item
|
||||
class="warning"
|
||||
@request-selected="${this._handleDisable}"
|
||||
>
|
||||
${this.hass.localize("ui.common.disable")}
|
||||
</mwc-list-item>`}
|
||||
<mwc-list-item
|
||||
class="warning"
|
||||
@request-selected="${this._handleDelete}"
|
||||
>
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.integrations.config_entry.delete"
|
||||
)}
|
||||
</mwc-list-item>
|
||||
</mwc-list-item>`
|
||||
: ""}
|
||||
${item.source !== "system"
|
||||
? html`<mwc-list-item
|
||||
class="warning"
|
||||
@request-selected="${this._handleDelete}"
|
||||
>
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.integrations.config_entry.delete"
|
||||
)}
|
||||
</mwc-list-item>`
|
||||
: ""}
|
||||
</ha-button-menu>
|
||||
</div>
|
||||
</ha-card>
|
||||
|
@ -2232,6 +2232,9 @@
|
||||
"create": "Create"
|
||||
}
|
||||
},
|
||||
"hassio": {
|
||||
"button": "Configure"
|
||||
},
|
||||
"mqtt": {
|
||||
"button": "Configure",
|
||||
"title": "MQTT",
|
||||
|
Loading…
x
Reference in New Issue
Block a user