mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 17:26:42 +00:00
Dont require manifest for the overflow menu (#9129)
This commit is contained in:
parent
6edebe18ad
commit
88dc65bc4e
@ -300,80 +300,73 @@ export class HaIntegrationCard extends LitElement {
|
|||||||
`
|
`
|
||||||
: ""}
|
: ""}
|
||||||
</div>
|
</div>
|
||||||
${!this.manifest
|
<ha-button-menu corner="BOTTOM_START">
|
||||||
? ""
|
<mwc-icon-button
|
||||||
: html`
|
.title=${this.hass.localize("ui.common.menu")}
|
||||||
<ha-button-menu corner="BOTTOM_START">
|
.label=${this.hass.localize("ui.common.overflow_menu")}
|
||||||
<mwc-icon-button
|
slot="trigger"
|
||||||
.title=${this.hass.localize("ui.common.menu")}
|
>
|
||||||
.label=${this.hass.localize("ui.common.overflow_menu")}
|
<ha-svg-icon .path=${mdiDotsVertical}></ha-svg-icon>
|
||||||
slot="trigger"
|
</mwc-icon-button>
|
||||||
>
|
<mwc-list-item @request-selected="${this._editEntryName}">
|
||||||
<ha-svg-icon .path=${mdiDotsVertical}></ha-svg-icon>
|
${this.hass.localize(
|
||||||
</mwc-icon-button>
|
"ui.panel.config.integrations.config_entry.rename"
|
||||||
<mwc-list-item @request-selected="${this._editEntryName}">
|
)}
|
||||||
|
</mwc-list-item>
|
||||||
|
<mwc-list-item @request-selected="${this._handleSystemOptions}">
|
||||||
|
${this.hass.localize(
|
||||||
|
"ui.panel.config.integrations.config_entry.system_options"
|
||||||
|
)}
|
||||||
|
</mwc-list-item>
|
||||||
|
${this.manifest
|
||||||
|
? html` <a
|
||||||
|
href=${this.manifest.documentation}
|
||||||
|
rel="noreferrer"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<mwc-list-item hasMeta>
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
"ui.panel.config.integrations.config_entry.rename"
|
"ui.panel.config.integrations.config_entry.documentation"
|
||||||
)}
|
)}<ha-svg-icon
|
||||||
|
slot="meta"
|
||||||
|
.path=${mdiOpenInNew}
|
||||||
|
></ha-svg-icon>
|
||||||
</mwc-list-item>
|
</mwc-list-item>
|
||||||
<mwc-list-item @request-selected="${this._handleSystemOptions}">
|
</a>`
|
||||||
${this.hass.localize(
|
: ""}
|
||||||
"ui.panel.config.integrations.config_entry.system_options"
|
${!item.disabled_by &&
|
||||||
)}
|
item.state === "loaded" &&
|
||||||
</mwc-list-item>
|
item.supports_unload &&
|
||||||
|
item.source !== "system"
|
||||||
<a
|
? html`<mwc-list-item @request-selected="${this._handleReload}">
|
||||||
href=${this.manifest.documentation}
|
${this.hass.localize(
|
||||||
rel="noreferrer"
|
"ui.panel.config.integrations.config_entry.reload"
|
||||||
target="_blank"
|
)}
|
||||||
>
|
</mwc-list-item>`
|
||||||
<mwc-list-item hasMeta>
|
: ""}
|
||||||
${this.hass.localize(
|
${item.disabled_by === "user"
|
||||||
"ui.panel.config.integrations.config_entry.documentation"
|
? html`<mwc-list-item @request-selected="${this._handleEnable}">
|
||||||
)}<ha-svg-icon
|
${this.hass.localize("ui.common.enable")}
|
||||||
slot="meta"
|
</mwc-list-item>`
|
||||||
.path=${mdiOpenInNew}
|
: item.source !== "system"
|
||||||
></ha-svg-icon>
|
? html`<mwc-list-item
|
||||||
</mwc-list-item>
|
class="warning"
|
||||||
</a>
|
@request-selected="${this._handleDisable}"
|
||||||
${!item.disabled_by &&
|
>
|
||||||
item.state === "loaded" &&
|
${this.hass.localize("ui.common.disable")}
|
||||||
item.supports_unload &&
|
</mwc-list-item>`
|
||||||
item.source !== "system"
|
: ""}
|
||||||
? html`<mwc-list-item
|
${item.source !== "system"
|
||||||
@request-selected="${this._handleReload}"
|
? html`<mwc-list-item
|
||||||
>
|
class="warning"
|
||||||
${this.hass.localize(
|
@request-selected="${this._handleDelete}"
|
||||||
"ui.panel.config.integrations.config_entry.reload"
|
>
|
||||||
)}
|
${this.hass.localize(
|
||||||
</mwc-list-item>`
|
"ui.panel.config.integrations.config_entry.delete"
|
||||||
: ""}
|
)}
|
||||||
${item.disabled_by === "user"
|
</mwc-list-item>`
|
||||||
? html`<mwc-list-item
|
: ""}
|
||||||
@request-selected="${this._handleEnable}"
|
</ha-button-menu>
|
||||||
>
|
|
||||||
${this.hass.localize("ui.common.enable")}
|
|
||||||
</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>`
|
|
||||||
: ""}
|
|
||||||
${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>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user