Use ha-alert for error and warning messages in the supervisor panel (#9892)

* Use ha-alert for error and warning messages in the supervisor panel

* use actionText

* Update hassio/src/dialogs/network/dialog-hassio-network.ts

Co-authored-by: Bram Kragten <mail@bramkragten.nl>

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
Joakim Sørensen
2021-08-27 16:45:05 +02:00
committed by GitHub
parent 719f9c28af
commit 67ab63f00e
13 changed files with 71 additions and 64 deletions

View File

@@ -6,6 +6,7 @@ import { customElement, property, query, state } from "lit/decorators";
import { fireEvent } from "../../../../src/common/dom/fire_event";
import { slugify } from "../../../../src/common/string/slugify";
import "../../../../src/components/buttons/ha-progress-button";
import "../../../../src/components/ha-alert";
import "../../../../src/components/ha-button-menu";
import "../../../../src/components/ha-header-bar";
import "../../../../src/components/ha-svg-icon";
@@ -89,7 +90,9 @@ class HassioBackupDialog
.localize=${this._dialogParams.localize}
>
</supervisor-backup-content>`}
${this._error ? html`<p class="error">Error: ${this._error}</p>` : ""}
${this._error
? html`<ha-alert alert-type="error">${this._error}</ha-alert>`
: ""}
<mwc-button
.disabled=${this._restoringBackup}