fix error display upload backup (#23565)

This commit is contained in:
Bram Kragten 2025-01-03 11:17:27 +01:00 committed by GitHub
parent 6d48e725c7
commit 1faf024c5b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -89,6 +89,9 @@ export class DialogUploadBackup
<span slot="title">Upload backup</span>
</ha-dialog-header>
<div slot="content">
${this._error
? html`<ha-alert alert-type="error">${this._error}</ha-alert>`
: nothing}
<ha-file-upload
.hass=${this.hass}
.uploading=${this._uploading}
@ -98,9 +101,6 @@ export class DialogUploadBackup
supports="Supports .tar files"
@file-picked=${this._filePicked}
></ha-file-upload>
${this._error
? html`<ha-alert alertType="error">${this._error}</ha-alert>`
: nothing}
</div>
<div slot="actions">
<ha-button @click=${this.closeDialog}>Cancel</ha-button>
@ -160,6 +160,10 @@ export class DialogUploadBackup
max-width: 500px;
max-height: 100%;
}
ha-alert {
display: block;
margin-bottom: 16px;
}
`,
];
}