Adjust header and wording in update dialogs (#8476)

This commit is contained in:
Joakim Sørensen 2021-03-01 12:40:52 +01:00 committed by GitHub
parent 3834ab8ede
commit f263a5221d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 21 deletions

View File

@ -63,16 +63,16 @@ class DialogSupervisorAddonUpdate extends LitElement {
protected render(): TemplateResult { protected render(): TemplateResult {
return html` return html`
<ha-dialog <ha-dialog .open=${this._opened} scrimClickAction escapeKeyAction>
.heading="Update ${this.addon.name}"
.open=${this._opened}
scrimClickAction
escapeKeyAction
>
${this._action === null ${this._action === null
? html`<div> ? html`<slot name="heading">
Are you sure you want to update this add-on to version <h2 id="title" class="header_title">
${this.addon.version_latest}? Update ${this.addon.name}
</h2>
</slot>
<div>
Are you sure you want to update the ${this.addon.name} add-on to
version ${this.addon.version_latest}?
</div> </div>
<ha-settings-row> <ha-settings-row>
@ -80,7 +80,8 @@ class DialogSupervisorAddonUpdate extends LitElement {
Snapshot Snapshot
</span> </span>
<span slot="description"> <span slot="description">
Create a snapshot of the add-on before updating Create a snapshot of the ${this.addon.name} add-on before
updating
</span> </span>
<ha-switch <ha-switch
.checked=${this._createSnapshot} .checked=${this._createSnapshot}
@ -100,8 +101,8 @@ class DialogSupervisorAddonUpdate extends LitElement {
</ha-circular-progress> </ha-circular-progress>
<p class="progress-text"> <p class="progress-text">
${this._action === "update" ${this._action === "update"
? `Update to version ${this.addon.version_latest} in progress` ? `Updating ${this.addon.name} to version ${this.addon.version_latest}`
: "Creating snapshot in progress"} : "Creating snapshot of Home Assistant Core"}
</p>`} </p>`}
${this._error ? html`<p class="error">${this._error}</p>` : ""} ${this._error ? html`<p class="error">${this._error}</p>` : ""}
</ha-dialog> </ha-dialog>

View File

@ -61,14 +61,14 @@ class DialogSupervisorCoreUpdate extends LitElement {
protected render(): TemplateResult { protected render(): TemplateResult {
return html` return html`
<ha-dialog <ha-dialog .open=${this._opened} scrimClickAction escapeKeyAction>
.open=${this._opened}
heading="Update Home Assistant Core"
scrimClickAction
escapeKeyAction
>
${this._action === null ${this._action === null
? html`<div> ? html`<slot name="heading">
<h2 id="title" class="header_title">
Update Home Assistant Core
</h2>
</slot>
<div>
Are you sure you want to update Home Assistant Core to version Are you sure you want to update Home Assistant Core to version
${this.core.version_latest}? ${this.core.version_latest}?
</div> </div>
@ -98,8 +98,8 @@ class DialogSupervisorCoreUpdate extends LitElement {
</ha-circular-progress> </ha-circular-progress>
<p class="progress-text"> <p class="progress-text">
${this._action === "update" ${this._action === "update"
? `Update to version ${this.core.version_latest} in progress` ? `Updating Home Assistant Core to version ${this.core.version_latest}`
: "Creating snapshot in progress"} : "Creating snapshot of Home Assistant Core"}
</p>`} </p>`}
${this._error ? html`<p class="error">${this._error}</p>` : ""} ${this._error ? html`<p class="error">${this._error}</p>` : ""}
</ha-dialog> </ha-dialog>