mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 19:56:42 +00:00
Ensure platform only integrations are displayed on the config info page (#8698)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
parent
10baa34c18
commit
ee38c419de
@ -25,8 +25,11 @@ export const integrationIssuesUrl = (
|
|||||||
manifest.issue_tracker ||
|
manifest.issue_tracker ||
|
||||||
`https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+${domain}%22`;
|
`https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+${domain}%22`;
|
||||||
|
|
||||||
export const domainToName = (localize: LocalizeFunc, domain: string) =>
|
export const domainToName = (
|
||||||
localize(`component.${domain}.title`) || domain;
|
localize: LocalizeFunc,
|
||||||
|
domain: string,
|
||||||
|
manifest?: IntegrationManifest
|
||||||
|
) => localize(`component.${domain}.title`) || manifest?.name || domain;
|
||||||
|
|
||||||
export const fetchIntegrationManifests = (hass: HomeAssistant) =>
|
export const fetchIntegrationManifests = (hass: HomeAssistant) =>
|
||||||
hass.callWS<IntegrationManifest[]>({ type: "manifest/list" });
|
hass.callWS<IntegrationManifest[]>({ type: "manifest/list" });
|
||||||
|
@ -28,7 +28,12 @@ class IntegrationsCard extends LitElement {
|
|||||||
};
|
};
|
||||||
|
|
||||||
private _sortedIntegrations = memoizeOne((components: string[]) => {
|
private _sortedIntegrations = memoizeOne((components: string[]) => {
|
||||||
return components.filter((comp) => !comp.includes(".")).sort();
|
return Array.from(
|
||||||
|
new Set(
|
||||||
|
components
|
||||||
|
.map((comp) => (comp.includes(".") ? comp.split(".")[1] : comp))
|
||||||
|
)
|
||||||
|
).sort();
|
||||||
});
|
});
|
||||||
|
|
||||||
firstUpdated(changedProps) {
|
firstUpdated(changedProps) {
|
||||||
@ -56,7 +61,7 @@ class IntegrationsCard extends LitElement {
|
|||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
<td class="name">
|
<td class="name">
|
||||||
${domainToName(this.hass.localize, domain)}<br />
|
${domainToName(this.hass.localize, domain, manifest)}<br />
|
||||||
<span class="domain">${domain}</span>
|
<span class="domain">${domain}</span>
|
||||||
</td>
|
</td>
|
||||||
${!manifest
|
${!manifest
|
||||||
|
Loading…
x
Reference in New Issue
Block a user