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

View File

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