Make restore button destructive (#24173)

This commit is contained in:
Wendelin 2025-02-11 09:37:56 +01:00 committed by GitHub
parent e86ad21ce2
commit dbd1e928de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -41,7 +41,7 @@ export class HaProgressButton extends LitElement {
indeterminate
></ha-circular-progress>
`
: ""}
: nothing}
</div>
`}
`;
@ -117,6 +117,9 @@ export class HaProgressButton extends LitElement {
mwc-button.error slot {
visibility: hidden;
}
:host([destructive]) {
--mdc-theme-primary: var(--error-color);
}
`;
}

View File

@ -92,6 +92,7 @@ class OnboardingRestoreBackupRestore extends LitElement {
.disabled=${this._loading ||
(backupProtected && this._encryptionKey === "")}
@click=${this._startRestore}
destructive
>
${this.localize(
"ui.panel.page-onboarding.restore.details.restore.action"