mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 11:16:35 +00:00
Rename last_non_idle_event to last_action_event (#24691)
This commit is contained in:
parent
27379c98df
commit
0e8be25a60
@ -136,7 +136,7 @@ export interface BackupInfo {
|
|||||||
agent_errors: Record<string, string>;
|
agent_errors: Record<string, string>;
|
||||||
last_attempted_automatic_backup: string | null;
|
last_attempted_automatic_backup: string | null;
|
||||||
last_completed_automatic_backup: string | null;
|
last_completed_automatic_backup: string | null;
|
||||||
last_non_idle_event: ManagerStateEvent | null;
|
last_action_event: ManagerStateEvent | null;
|
||||||
next_automatic_backup: string | null;
|
next_automatic_backup: string | null;
|
||||||
next_automatic_backup_additional: boolean;
|
next_automatic_backup_additional: boolean;
|
||||||
state: BackupManagerState;
|
state: BackupManagerState;
|
||||||
|
@ -8,7 +8,7 @@ import type {
|
|||||||
|
|
||||||
export interface BackupOnboardingInfo {
|
export interface BackupOnboardingInfo {
|
||||||
state: BackupManagerState;
|
state: BackupManagerState;
|
||||||
last_non_idle_event?: {
|
last_action_event?: {
|
||||||
manager_state: BackupManagerState;
|
manager_state: BackupManagerState;
|
||||||
stage: RestoreBackupStage | null;
|
stage: RestoreBackupStage | null;
|
||||||
state: RestoreBackupState;
|
state: RestoreBackupState;
|
||||||
|
@ -91,7 +91,7 @@ class OnboardingRestoreBackup extends LitElement {
|
|||||||
.supervisor=${this.supervisor}
|
.supervisor=${this.supervisor}
|
||||||
.error=${this._failed
|
.error=${this._failed
|
||||||
? this.localize(
|
? this.localize(
|
||||||
`ui.panel.page-onboarding.restore.${this._backupInfo?.last_non_idle_event?.reason === "password_incorrect" ? "failed_wrong_password_description" : "failed_description"}`
|
`ui.panel.page-onboarding.restore.${this._backupInfo?.last_action_event?.reason === "password_incorrect" ? "failed_wrong_password_description" : "failed_description"}`
|
||||||
)
|
)
|
||||||
: this._error}
|
: this._error}
|
||||||
@restore-started=${this._restoreStarted}
|
@restore-started=${this._restoreStarted}
|
||||||
@ -157,14 +157,14 @@ class OnboardingRestoreBackup extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const {
|
const {
|
||||||
last_non_idle_event: lastNonIdleEvent,
|
last_action_event: lastActionEvent,
|
||||||
state: currentState,
|
state: currentState,
|
||||||
backups,
|
backups,
|
||||||
} = onboardingInfo;
|
} = onboardingInfo;
|
||||||
|
|
||||||
this._backupInfo = {
|
this._backupInfo = {
|
||||||
state: currentState,
|
state: currentState,
|
||||||
last_non_idle_event: lastNonIdleEvent,
|
last_action_event: lastActionEvent,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.mode === "cloud") {
|
if (this.mode === "cloud") {
|
||||||
@ -192,8 +192,8 @@ class OnboardingRestoreBackup extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const failedRestore =
|
const failedRestore =
|
||||||
lastNonIdleEvent?.manager_state === "restore_backup" &&
|
lastActionEvent?.manager_state === "restore_backup" &&
|
||||||
lastNonIdleEvent?.state === "failed";
|
lastActionEvent?.state === "failed";
|
||||||
|
|
||||||
if (failedRestore) {
|
if (failedRestore) {
|
||||||
this._failed = true;
|
this._failed = true;
|
||||||
|
@ -42,11 +42,11 @@ class OnboardingRestoreBackupStatus extends LitElement {
|
|||||||
"ui.panel.page-onboarding.restore.failed_status_description"
|
"ui.panel.page-onboarding.restore.failed_status_description"
|
||||||
)}
|
)}
|
||||||
</ha-alert>
|
</ha-alert>
|
||||||
${this.backupInfo.last_non_idle_event?.reason
|
${this.backupInfo.last_action_event?.reason
|
||||||
? html`
|
? html`
|
||||||
<div class="failed">
|
<div class="failed">
|
||||||
<h4>Error:</h4>
|
<h4>Error:</h4>
|
||||||
${this.backupInfo.last_non_idle_event?.reason}
|
${this.backupInfo.last_action_event?.reason}
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
: nothing}
|
: nothing}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user