mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 08:16:36 +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 {
|
public showDialog(params: BackupOnboardingDialogParams): void {
|
||||||
this._params = params;
|
this._params = params;
|
||||||
this._step = params.skipWelcome ? STEPS[1] : STEPS[0];
|
this._step = this._firstStep;
|
||||||
this._config = RECOMMENDED_CONFIG;
|
this._config = RECOMMENDED_CONFIG;
|
||||||
|
|
||||||
const agents: string[] = [];
|
const agents: string[] = [];
|
||||||
@ -129,6 +129,10 @@ class DialogBackupOnboarding extends LitElement implements HassDialog {
|
|||||||
this._params = undefined;
|
this._params = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private get _firstStep(): Step {
|
||||||
|
return this._params?.skipWelcome ? STEPS[1] : STEPS[0];
|
||||||
|
}
|
||||||
|
|
||||||
private async _done() {
|
private async _done() {
|
||||||
if (!this._config) {
|
if (!this._config) {
|
||||||
return;
|
return;
|
||||||
@ -187,7 +191,7 @@ class DialogBackupOnboarding extends LitElement implements HassDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const isLastStep = this._step === STEPS[STEPS.length - 1];
|
const isLastStep = this._step === STEPS[STEPS.length - 1];
|
||||||
const isFirstStep = this._step === STEPS[0];
|
const isFirstStep = this._step === this._firstStep;
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<ha-md-dialog disable-cancel-action open @closed=${this.closeDialog}>
|
<ha-md-dialog disable-cancel-action open @closed=${this.closeDialog}>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user