mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Limit integration card to 1 action row (#16780)
This commit is contained in:
parent
677cd2de10
commit
fe8eb333b9
@ -95,7 +95,9 @@ export class HaIntegrationCard extends LitElement {
|
|||||||
|
|
||||||
private _renderSingleEntry(): TemplateResult {
|
private _renderSingleEntry(): TemplateResult {
|
||||||
const devices = this._getDevices(this.items, this.hass.devices);
|
const devices = this._getDevices(this.items, this.hass.devices);
|
||||||
const entities = this._getEntities(this.items, this.entityRegistryEntries);
|
const entities = devices.length
|
||||||
|
? []
|
||||||
|
: this._getEntities(this.items, this.entityRegistryEntries);
|
||||||
|
|
||||||
const services = !devices.some((device) => device.entry_type !== "service");
|
const services = !devices.some((device) => device.entry_type !== "service");
|
||||||
|
|
||||||
@ -122,8 +124,7 @@ export class HaIntegrationCard extends LitElement {
|
|||||||
<ha-icon-next slot="meta"></ha-icon-next>
|
<ha-icon-next slot="meta"></ha-icon-next>
|
||||||
</ha-list-item>
|
</ha-list-item>
|
||||||
</a>`
|
</a>`
|
||||||
: ""}
|
: entities.length > 0
|
||||||
${entities.length > 0
|
|
||||||
? html`<a
|
? html`<a
|
||||||
href=${`/config/entities?historyBack=1&domain=${this.domain}`}
|
href=${`/config/entities?historyBack=1&domain=${this.domain}`}
|
||||||
>
|
>
|
||||||
@ -140,9 +141,7 @@ export class HaIntegrationCard extends LitElement {
|
|||||||
<ha-icon-next slot="meta"></ha-icon-next>
|
<ha-icon-next slot="meta"></ha-icon-next>
|
||||||
</ha-list-item>
|
</ha-list-item>
|
||||||
</a>`
|
</a>`
|
||||||
: ""}
|
: html`<a href=${`/config/integrations/integration/${this.domain}`}>
|
||||||
${devices.length === 0 && entities.length === 0
|
|
||||||
? html`<a href=${`/config/integrations/integration/${this.domain}`}>
|
|
||||||
<ha-list-item hasMeta graphic="icon">
|
<ha-list-item hasMeta graphic="icon">
|
||||||
<ha-svg-icon
|
<ha-svg-icon
|
||||||
.path=${mdiPuzzleOutline}
|
.path=${mdiPuzzleOutline}
|
||||||
@ -155,8 +154,7 @@ export class HaIntegrationCard extends LitElement {
|
|||||||
)}
|
)}
|
||||||
<ha-icon-next slot="meta"></ha-icon-next>
|
<ha-icon-next slot="meta"></ha-icon-next>
|
||||||
</ha-list-item>
|
</ha-list-item>
|
||||||
</a>`
|
</a>`}
|
||||||
: ""}
|
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user