mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26: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>;
|
||||
last_attempted_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_additional: boolean;
|
||||
state: BackupManagerState;
|
||||
|
@ -8,7 +8,7 @@ import type {
|
||||
|
||||
export interface BackupOnboardingInfo {
|
||||
state: BackupManagerState;
|
||||
last_non_idle_event?: {
|
||||
last_action_event?: {
|
||||
manager_state: BackupManagerState;
|
||||
stage: RestoreBackupStage | null;
|
||||
state: RestoreBackupState;
|
||||
|
@ -91,7 +91,7 @@ class OnboardingRestoreBackup extends LitElement {
|
||||
.supervisor=${this.supervisor}
|
||||
.error=${this._failed
|
||||
? 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}
|
||||
@restore-started=${this._restoreStarted}
|
||||
@ -157,14 +157,14 @@ class OnboardingRestoreBackup extends LitElement {
|
||||
}
|
||||
|
||||
const {
|
||||
last_non_idle_event: lastNonIdleEvent,
|
||||
last_action_event: lastActionEvent,
|
||||
state: currentState,
|
||||
backups,
|
||||
} = onboardingInfo;
|
||||
|
||||
this._backupInfo = {
|
||||
state: currentState,
|
||||
last_non_idle_event: lastNonIdleEvent,
|
||||
last_action_event: lastActionEvent,
|
||||
};
|
||||
|
||||
if (this.mode === "cloud") {
|
||||
@ -192,8 +192,8 @@ class OnboardingRestoreBackup extends LitElement {
|
||||
}
|
||||
|
||||
const failedRestore =
|
||||
lastNonIdleEvent?.manager_state === "restore_backup" &&
|
||||
lastNonIdleEvent?.state === "failed";
|
||||
lastActionEvent?.manager_state === "restore_backup" &&
|
||||
lastActionEvent?.state === "failed";
|
||||
|
||||
if (failedRestore) {
|
||||
this._failed = true;
|
||||
|
@ -42,11 +42,11 @@ class OnboardingRestoreBackupStatus extends LitElement {
|
||||
"ui.panel.page-onboarding.restore.failed_status_description"
|
||||
)}
|
||||
</ha-alert>
|
||||
${this.backupInfo.last_non_idle_event?.reason
|
||||
${this.backupInfo.last_action_event?.reason
|
||||
? html`
|
||||
<div class="failed">
|
||||
<h4>Error:</h4>
|
||||
${this.backupInfo.last_non_idle_event?.reason}
|
||||
${this.backupInfo.last_action_event?.reason}
|
||||
</div>
|
||||
`
|
||||
: nothing}
|
||||
|
Loading…
x
Reference in New Issue
Block a user