mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Fix restoring backup during onboarding (#23569)
This commit is contained in:
parent
70541ec966
commit
e2ad94469a
@ -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…
x
Reference in New Issue
Block a user