mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-25 13:57:21 +00:00
Fix application credentials description when loaded from config flow (#12940)
This commit is contained in:
parent
765d4eb3b4
commit
6a3a0db338
@ -73,7 +73,10 @@ export class DialogAddApplicationCredential extends LitElement {
|
|||||||
id: domain,
|
id: domain,
|
||||||
name: domainToName(this.hass.localize, domain),
|
name: domainToName(this.hass.localize, domain),
|
||||||
}));
|
}));
|
||||||
this.hass.loadBackendTranslation("application_credentials");
|
await this.hass.loadBackendTranslation("application_credentials");
|
||||||
|
if (this._domain !== "") {
|
||||||
|
this._updateDescription();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected render(): TemplateResult {
|
protected render(): TemplateResult {
|
||||||
@ -182,9 +185,13 @@ export class DialogAddApplicationCredential extends LitElement {
|
|||||||
fireEvent(this, "dialog-closed", { dialog: this.localName });
|
fireEvent(this, "dialog-closed", { dialog: this.localName });
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _handleDomainPicked(ev: CustomEvent) {
|
private _handleDomainPicked(ev: CustomEvent) {
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
this._domain = ev.detail.value;
|
this._domain = ev.detail.value;
|
||||||
|
this._updateDescription();
|
||||||
|
}
|
||||||
|
|
||||||
|
private _updateDescription() {
|
||||||
const info = this._config!.integrations[this._domain!];
|
const info = this._config!.integrations[this._domain!];
|
||||||
this._description = this.hass.localize(
|
this._description = this.hass.localize(
|
||||||
`component.${this._domain}.application_credentials.description`,
|
`component.${this._domain}.application_credentials.description`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user