From 73f98f93a0c998079bf9bcadc20704e2ee7818a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 14 Jul 2022 18:01:57 +0200 Subject: [PATCH] First-Time Wizard: reload the webpage after a succesful save After saving the configuration, show a message & restart the webapp. The restarting is done after 2 seconds, to give the Manager some time to restart after receiving the new config. --- web/app/src/views/FirstTimeWizardView.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/web/app/src/views/FirstTimeWizardView.vue b/web/app/src/views/FirstTimeWizardView.vue index 84c06ad5..3a54e475 100644 --- a/web/app/src/views/FirstTimeWizardView.vue +++ b/web/app/src/views/FirstTimeWizardView.vue @@ -87,6 +87,8 @@ "{{ selectedBlender.path }}" + +

Configuration has been saved, Flamenco will restart.

@@ -130,6 +132,7 @@ export default { input_path: "You pointed Flamenco to this executable.", }, isConfirming: false, + isConfirmed: false, }), computed: { cleanSharedStoragePath() { @@ -233,14 +236,17 @@ export default { ); console.log("saving configuration:", wizardConfig); this.isConfirming = true; + this.isConfirmed = false; this.metaAPI.saveWizardConfig({ wizardConfig: wizardConfig }) .then((result) => { console.log("Wizard config saved, reload the page"); + this.isConfirmed = true; + // Give the Manager some time to restart. + window.setTimeout(() => { window.location.reload() }, 2000); }) .catch((error) => { console.log("Error saving wizard config:", error); - }) - .finally(() => { + // Only clear this flag on an error. this.isConfirming = false; }) },