mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 01:06:35 +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
|
<ha-assist-chip
|
||||||
.label=${localize("ui.components.subpage-data-table.sort_by", {
|
.label=${localize("ui.components.subpage-data-table.sort_by", {
|
||||||
sortColumn: this._sortColumn
|
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"
|
id="sort-by-anchor"
|
||||||
|
@ -538,7 +538,9 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
|
|||||||
</h1>
|
</h1>
|
||||||
${normalEntries.length === 0
|
${normalEntries.length === 0
|
||||||
? html`<div class="card-content no-entries">
|
? 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
|
(comp) => comp.split(".")[0] === this.domain
|
||||||
)
|
)
|
||||||
? this.hass.localize(
|
? this.hass.localize(
|
||||||
|
@ -172,6 +172,7 @@ class HaConfigIntegrationsDashboard extends SubscribeMixin(LitElement) {
|
|||||||
if (
|
if (
|
||||||
!entryDomains.has(componentDomain) &&
|
!entryDomains.has(componentDomain) &&
|
||||||
manifests[componentDomain] &&
|
manifests[componentDomain] &&
|
||||||
|
!manifests[componentDomain].config_flow &&
|
||||||
(!manifests[componentDomain].integration_type ||
|
(!manifests[componentDomain].integration_type ||
|
||||||
["device", "hub", "service", "integration"].includes(
|
["device", "hub", "service", "integration"].includes(
|
||||||
manifests[componentDomain].integration_type!
|
manifests[componentDomain].integration_type!
|
||||||
@ -314,6 +315,11 @@ class HaConfigIntegrationsDashboard extends SubscribeMixin(LitElement) {
|
|||||||
this.configEntriesInProgress.map((flow) => flow.handler)
|
this.configEntriesInProgress.map((flow) => flow.handler)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (changed.has("configEntries") && this.configEntries) {
|
||||||
|
this._fetchIntegrationManifests(
|
||||||
|
this.configEntries.map((entry) => entry.domain)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected render() {
|
protected render() {
|
||||||
|
@ -151,7 +151,10 @@ class HaConfigIntegrations extends SubscribeMixin(HassRouterPage) {
|
|||||||
if (this.hasUpdated) {
|
if (this.hasUpdated) {
|
||||||
return;
|
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) {
|
protected updatePageEl(pageEl) {
|
||||||
|
@ -182,7 +182,7 @@ export class HaIntegrationCard extends LitElement {
|
|||||||
>
|
>
|
||||||
</div>`
|
</div>`
|
||||||
: nothing}
|
: nothing}
|
||||||
${!this.manifest?.config_flow
|
${this.manifest && !this.manifest?.config_flow
|
||||||
? html`<div class="icon yaml">
|
? html`<div class="icon yaml">
|
||||||
<ha-svg-icon .path=${mdiCodeBraces}></ha-svg-icon>
|
<ha-svg-icon .path=${mdiCodeBraces}></ha-svg-icon>
|
||||||
<simple-tooltip
|
<simple-tooltip
|
||||||
|
Loading…
x
Reference in New Issue
Block a user