diff --git a/src_assets/common/assets/web/config.html b/src_assets/common/assets/web/config.html index 3e56413a..af7ac58d 100644 --- a/src_assets/common/assets/web/config.html +++ b/src_assets/common/assets/web/config.html @@ -475,7 +475,7 @@ -
+
-
+
{ - if (r.status === 200) this.saved = true; + if (r.status === 200) { + this.saved = true + return this.saved + } + else { + return false + } }); }, apply() { this.saved = this.restarted = false; - this.save(); - if (this.saved === true) { - fetch("/api/restart", { - method: "POST", - }).then((r) => { - if (r.status === 200) this.restarted = true; - }); - } + let saved = this.save(); + + saved.then((result) => { + if (result === true) { + fetch("/api/restart", { + method: "POST" + }).then((r) => { + if (r.status === 200) this.restarted = true; + }); + } + }); }, }, });