Add loading text for long-running integration install step (#4378)

* Added optional label for dialog-data-entry-flow

* Use correct loading element

* Update src/translations/en.json

Co-Authored-By: Bram Kragten <mail@bramkragten.nl>

* Minor template adjustment

* Revert accidental change of PR templates

* Revert accidental change of PR templates

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
Olivér Falvai 2020-03-18 17:00:08 +01:00 committed by GitHub
parent 6b2e707653
commit a8d21c6112
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 2 deletions

View File

@ -130,7 +130,11 @@ class DataEntryFlowDialog extends LitElement {
> >
${this._loading || (this._step === null && this._handlers === undefined) ${this._loading || (this._step === null && this._handlers === undefined)
? html` ? html`
<step-flow-loading></step-flow-loading> <step-flow-loading
.label=${this.hass.localize(
"ui.panel.config.integrations.config_flow.loading_first_time"
)}
></step-flow-loading>
` `
: this._step === undefined : this._step === undefined
? // When we are going to next step, we render 1 round of empty ? // When we are going to next step, we render 1 round of empty

View File

@ -5,14 +5,22 @@ import {
css, css,
customElement, customElement,
CSSResult, CSSResult,
property,
} from "lit-element"; } from "lit-element";
import "@polymer/paper-spinner/paper-spinner-lite"; import "@polymer/paper-spinner/paper-spinner-lite";
@customElement("step-flow-loading") @customElement("step-flow-loading")
class StepFlowLoading extends LitElement { class StepFlowLoading extends LitElement {
@property() public label?: string;
protected render(): TemplateResult { protected render(): TemplateResult {
return html` return html`
<div class="init-spinner"> <div class="init-spinner">
${this.label
? html`
<div>${this.label}</div>
`
: ""}
<paper-spinner-lite active></paper-spinner-lite> <paper-spinner-lite active></paper-spinner-lite>
</div> </div>
`; `;

View File

@ -1638,7 +1638,8 @@
"external_step": { "external_step": {
"description": "This step requires you to visit an external website to be completed.", "description": "This step requires you to visit an external website to be completed.",
"open_site": "Open website" "open_site": "Open website"
} },
"loading_first_time": "Please wait while the integration is being installed"
} }
}, },
"users": { "users": {