From dd49fd27889d301e286b1a46bb8911ce20f71896 Mon Sep 17 00:00:00 2001 From: Allen Porter Date: Sun, 1 May 2022 09:02:32 -0700 Subject: [PATCH] Make the "Aborted: Reauthentication successful" more user friendly (#12530) Replace the "Aborted" in the title with the integration name to make the user error messages more user friendly. The message itself ("Reauthentication successful" or "Missing configuraiton, etc) error message is descriptive enought that we can replace the title with the integration name and still preserve the meeting. The advance is that this doesn't confuse users who are surprised by it saying "Aborted" when things were successful https://github.com/home-assistant/core/issues/47135 --- src/dialogs/config-flow/dialog-data-entry-flow.ts | 1 + src/dialogs/config-flow/step-flow-abort.ts | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/dialogs/config-flow/dialog-data-entry-flow.ts b/src/dialogs/config-flow/dialog-data-entry-flow.ts index 023807a439..d0a7d28d13 100644 --- a/src/dialogs/config-flow/dialog-data-entry-flow.ts +++ b/src/dialogs/config-flow/dialog-data-entry-flow.ts @@ -312,6 +312,7 @@ class DataEntryFlowDialog extends LitElement { .flowConfig=${this._params.flowConfig} .step=${this._step} .hass=${this.hass} + .domain=${this._step.handler} > ` : this._step.type === "progress" diff --git a/src/dialogs/config-flow/step-flow-abort.ts b/src/dialogs/config-flow/step-flow-abort.ts index dfed959d90..79581e366a 100644 --- a/src/dialogs/config-flow/step-flow-abort.ts +++ b/src/dialogs/config-flow/step-flow-abort.ts @@ -15,13 +15,11 @@ class StepFlowAbort extends LitElement { @property({ attribute: false }) public step!: DataEntryFlowStepAbort; + @property({ attribute: false }) public domain!: string; + protected render(): TemplateResult { return html` -

- ${this.hass.localize( - "ui.panel.config.integrations.config_flow.aborted" - )} -

+

${this.hass.localize(`component.${this.domain}.title`)}

${this.flowConfig.renderAbortDescription(this.hass, this.step)}