فهرست منبع

Await configuration load and save requests

SybexXx 1 روز پیش
والد
کامیت
b5c8dd2664
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      sd-card/html/edit_analog.html

+ 4 - 4
sd-card/html/edit_analog.html

@@ -348,11 +348,11 @@ The following settings are only used for easier setup, they are <b>not</b> persi
         UpdateROIs();
     }
 
-    function SaveToConfig() {
+    async function SaveToConfig() {
         //_zwcat = getConfigCategory();
         cofcat["Analog"]["enabled"] = document.getElementById("Category_Analog_enabled").checked;
         WriteConfigININew();
-        SaveConfigToServer(domainname);
+        await SaveConfigToServer(domainname);
         UpdateROIs();
         document.getElementById("saveroi").disabled = true;
 
@@ -557,11 +557,11 @@ The following settings are only used for easier setup, they are <b>not</b> persi
         }
     }
     
-    function init() {
+    async function init() {
         openDescription();
         domainname = getDomainname();
 		
-		if (!loadConfig(domainname)) {
+		if (!await loadConfig(domainname)) {
 			firework.launch('Configuration could not be loaded! Please reload the page!', 'danger', 30000);
 			return;
 		}