Fix restoring backup during onboarding (#23569)
parent
71e10d5d8e
commit
4ffec51a5e
|
@ -179,8 +179,8 @@ class HassioBackupDialog
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _restoreClicked() {
|
private async _restoreClicked() {
|
||||||
this._restoringBackup = true;
|
|
||||||
const backupDetails = this._backupContent.backupDetails();
|
const backupDetails = this._backupContent.backupDetails();
|
||||||
|
this._restoringBackup = true;
|
||||||
|
|
||||||
const supervisor = this._dialogParams?.supervisor;
|
const supervisor = this._dialogParams?.supervisor;
|
||||||
if (supervisor !== undefined && supervisor.info.state !== "running") {
|
if (supervisor !== undefined && supervisor.info.state !== "running") {
|
||||||
|
@ -196,12 +196,12 @@ class HassioBackupDialog
|
||||||
if (
|
if (
|
||||||
!(await showConfirmationDialog(this, {
|
!(await showConfirmationDialog(this, {
|
||||||
title: this._localize(
|
title: this._localize(
|
||||||
this._backupContent.backupType === "full"
|
this._backup!.type === "full"
|
||||||
? "confirm_restore_full_backup_title"
|
? "confirm_restore_full_backup_title"
|
||||||
: "confirm_restore_partial_backup_title"
|
: "confirm_restore_partial_backup_title"
|
||||||
),
|
),
|
||||||
text: this._localize(
|
text: this._localize(
|
||||||
this._backupContent.backupType === "full"
|
this._backup!.type === "full"
|
||||||
? "confirm_restore_full_backup_text"
|
? "confirm_restore_full_backup_text"
|
||||||
: "confirm_restore_partial_backup_text"
|
: "confirm_restore_partial_backup_text"
|
||||||
),
|
),
|
||||||
|
@ -216,9 +216,9 @@ class HassioBackupDialog
|
||||||
try {
|
try {
|
||||||
await restoreBackup(
|
await restoreBackup(
|
||||||
this.hass,
|
this.hass,
|
||||||
this._backupContent.backupType,
|
this._backup!.type,
|
||||||
this._backup!.slug,
|
this._backup!.slug,
|
||||||
backupDetails,
|
{ ...backupDetails, background: this._dialogParams?.onboarding },
|
||||||
!!this.hass && atLeastVersion(this.hass.config.version, 2021, 9)
|
!!this.hass && atLeastVersion(this.hass.config.version, 2021, 9)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ export interface HassioFullBackupCreateParams {
|
||||||
name: string;
|
name: string;
|
||||||
password?: string;
|
password?: string;
|
||||||
confirm_password?: string;
|
confirm_password?: string;
|
||||||
|
background?: boolean;
|
||||||
}
|
}
|
||||||
export interface HassioPartialBackupCreateParams
|
export interface HassioPartialBackupCreateParams
|
||||||
extends HassioFullBackupCreateParams {
|
extends HassioFullBackupCreateParams {
|
||||||
|
|
Loading…
Reference in New Issue