diff --git a/views/style.css b/src/interface/web/assets/config.css similarity index 100% rename from views/style.css rename to src/interface/web/assets/config.css diff --git a/views/scripts/config.js b/src/interface/web/assets/config.js similarity index 96% rename from views/scripts/config.js rename to src/interface/web/assets/config.js index c3f47743..30ab6858 100644 --- a/views/scripts/config.js +++ b/src/interface/web/assets/config.js @@ -10,7 +10,7 @@ var emptyValueDefault = "🖊️"; /** * Fetch the existing config file. */ -fetch("/config") +fetch("/config/data") .then(response => response.json()) .then(data => { rawConfig = data; @@ -26,15 +26,16 @@ fetch("/config") configForm.addEventListener("submit", (event) => { event.preventDefault(); console.log(rawConfig); - const response = fetch("/config", { + fetch("/config/data", { method: "POST", credentials: "same-origin", headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(rawConfig) - }).then(response => response.json()) - .then((data) => console.log(data)); + }) + .then(response => response.json()) + .then(data => console.log(data)); }); }); diff --git a/src/interface/web/config.html b/src/interface/web/config.html new file mode 100644 index 00000000..27de4aa9 --- /dev/null +++ b/src/interface/web/config.html @@ -0,0 +1,14 @@ + +
+ + + +