mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-06-28 17:35:12 +00:00
Implement state recovery, make ask before reload opt-in
This commit is contained in:
@ -44,6 +44,7 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||
this.initCommandHandling();
|
||||
this.initDeploymentNotifications();
|
||||
this.triggerFirstFSMStepIfNeeded();
|
||||
this.recoverIfNeeded();
|
||||
}
|
||||
|
||||
initCommandHandling() {
|
||||
@ -74,6 +75,12 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
recoverIfNeeded() {
|
||||
if (config.dashboard.recoverAfterPageReload) {
|
||||
setTimeout(() => this.webSocketService.sendJSON({'key': 'recover'}));
|
||||
}
|
||||
}
|
||||
|
||||
layoutHandler(data: LayoutCommand) {
|
||||
if (config.dashboard.enabledLayouts.includes(data.value)) {
|
||||
this.setLayout(data.value);
|
||||
|
Reference in New Issue
Block a user