mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 07:16:39 +00:00
Backup onboarding: Show close button when welcome is skipped (#23567)
This commit is contained in:
parent
3ff5b832bc
commit
cfbcb74ac2
@ -90,7 +90,7 @@ class DialogBackupOnboarding extends LitElement implements HassDialog {
|
||||
|
||||
public showDialog(params: BackupOnboardingDialogParams): void {
|
||||
this._params = params;
|
||||
this._step = params.skipWelcome ? STEPS[1] : STEPS[0];
|
||||
this._step = this._firstStep;
|
||||
this._config = RECOMMENDED_CONFIG;
|
||||
|
||||
const agents: string[] = [];
|
||||
@ -129,6 +129,10 @@ class DialogBackupOnboarding extends LitElement implements HassDialog {
|
||||
this._params = undefined;
|
||||
}
|
||||
|
||||
private get _firstStep(): Step {
|
||||
return this._params?.skipWelcome ? STEPS[1] : STEPS[0];
|
||||
}
|
||||
|
||||
private async _done() {
|
||||
if (!this._config) {
|
||||
return;
|
||||
@ -187,7 +191,7 @@ class DialogBackupOnboarding extends LitElement implements HassDialog {
|
||||
}
|
||||
|
||||
const isLastStep = this._step === STEPS[STEPS.length - 1];
|
||||
const isFirstStep = this._step === STEPS[0];
|
||||
const isFirstStep = this._step === this._firstStep;
|
||||
|
||||
return html`
|
||||
<ha-md-dialog disable-cancel-action open @closed=${this.closeDialog}>
|
||||
|
Loading…
x
Reference in New Issue
Block a user