mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 08:16:36 +00:00
Fix translation loading and manifest fetching for integration page (#21501)
This commit is contained in:
parent
4ade39543d
commit
a5786b4761
@ -266,7 +266,8 @@ export class HaTabsSubpageDataTable extends LitElement {
|
||||
<ha-assist-chip
|
||||
.label=${localize("ui.components.subpage-data-table.sort_by", {
|
||||
sortColumn: this._sortColumn
|
||||
? ` ${this.columns[this._sortColumn].title || this.columns[this._sortColumn].label}`
|
||||
? ` ${this.columns[this._sortColumn]?.title || this.columns[this._sortColumn]?.label}` ||
|
||||
""
|
||||
: "",
|
||||
})}
|
||||
id="sort-by-anchor"
|
||||
|
@ -538,7 +538,9 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
|
||||
</h1>
|
||||
${normalEntries.length === 0
|
||||
? html`<div class="card-content no-entries">
|
||||
${this.hass.config.components.find(
|
||||
${this._manifest &&
|
||||
!this._manifest.config_flow &&
|
||||
this.hass.config.components.find(
|
||||
(comp) => comp.split(".")[0] === this.domain
|
||||
)
|
||||
? this.hass.localize(
|
||||
|
@ -172,6 +172,7 @@ class HaConfigIntegrationsDashboard extends SubscribeMixin(LitElement) {
|
||||
if (
|
||||
!entryDomains.has(componentDomain) &&
|
||||
manifests[componentDomain] &&
|
||||
!manifests[componentDomain].config_flow &&
|
||||
(!manifests[componentDomain].integration_type ||
|
||||
["device", "hub", "service", "integration"].includes(
|
||||
manifests[componentDomain].integration_type!
|
||||
@ -314,6 +315,11 @@ class HaConfigIntegrationsDashboard extends SubscribeMixin(LitElement) {
|
||||
this.configEntriesInProgress.map((flow) => flow.handler)
|
||||
);
|
||||
}
|
||||
if (changed.has("configEntries") && this.configEntries) {
|
||||
this._fetchIntegrationManifests(
|
||||
this.configEntries.map((entry) => entry.domain)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
protected render() {
|
||||
|
@ -151,7 +151,10 @@ class HaConfigIntegrations extends SubscribeMixin(HassRouterPage) {
|
||||
if (this.hasUpdated) {
|
||||
return;
|
||||
}
|
||||
this._loadTranslationsPromise = this.hass.loadBackendTranslation("title");
|
||||
this._loadTranslationsPromise = this.hass.loadBackendTranslation(
|
||||
"title",
|
||||
this.hass.config.components.map((comp) => comp.split(".")[0])
|
||||
);
|
||||
}
|
||||
|
||||
protected updatePageEl(pageEl) {
|
||||
|
@ -182,7 +182,7 @@ export class HaIntegrationCard extends LitElement {
|
||||
>
|
||||
</div>`
|
||||
: nothing}
|
||||
${!this.manifest?.config_flow
|
||||
${this.manifest && !this.manifest?.config_flow
|
||||
? html`<div class="icon yaml">
|
||||
<ha-svg-icon .path=${mdiCodeBraces}></ha-svg-icon>
|
||||
<simple-tooltip
|
||||
|
Loading…
x
Reference in New Issue
Block a user