mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46: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 ||
|
||||
`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) =>
|
||||
localize(`component.${domain}.title`) || domain;
|
||||
export const domainToName = (
|
||||
localize: LocalizeFunc,
|
||||
domain: string,
|
||||
manifest?: IntegrationManifest
|
||||
) => localize(`component.${domain}.title`) || manifest?.name || domain;
|
||||
|
||||
export const fetchIntegrationManifests = (hass: HomeAssistant) =>
|
||||
hass.callWS<IntegrationManifest[]>({ type: "manifest/list" });
|
||||
|
@ -28,7 +28,12 @@ class IntegrationsCard extends LitElement {
|
||||
};
|
||||
|
||||
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) {
|
||||
@ -56,7 +61,7 @@ class IntegrationsCard extends LitElement {
|
||||
/>
|
||||
</td>
|
||||
<td class="name">
|
||||
${domainToName(this.hass.localize, domain)}<br />
|
||||
${domainToName(this.hass.localize, domain, manifest)}<br />
|
||||
<span class="domain">${domain}</span>
|
||||
</td>
|
||||
${!manifest
|
||||
|
Loading…
x
Reference in New Issue
Block a user