aboutsummaryrefslogtreecommitdiff
path: root/src/js/arching-kaos-web-ui-settings.js
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2023-09-07 15:34:27 +0300
committerkaotisk <kaotisk@arching-kaos.org>2023-09-07 15:34:27 +0300
commit886bac0089a8c3363a3e475a46304719e72169c8 (patch)
tree88afdb78bd7fecf4adf14118d01feebfb40d37bc /src/js/arching-kaos-web-ui-settings.js
parentec3157b02b9d622a41e1d682a62cc1db8091ab39 (diff)
downloadarching-kaos-web-ui-886bac0089a8c3363a3e475a46304719e72169c8.tar.gz
arching-kaos-web-ui-886bac0089a8c3363a3e475a46304719e72169c8.tar.bz2
arching-kaos-web-ui-886bac0089a8c3363a3e475a46304719e72169c8.zip
Expands sub-objects from settings object
Diffstat (limited to 'src/js/arching-kaos-web-ui-settings.js')
-rw-r--r--src/js/arching-kaos-web-ui-settings.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/js/arching-kaos-web-ui-settings.js b/src/js/arching-kaos-web-ui-settings.js
index 1e75def..18dfafa 100644
--- a/src/js/arching-kaos-web-ui-settings.js
+++ b/src/js/arching-kaos-web-ui-settings.js
@@ -79,7 +79,21 @@ function settingPlaceToDOM(key, value){
var paragraph = document.createElement("p");
container.appendChild(paragraph);
if ( Array.isArray(value) ){
- paragraph.innerText = "You will need to map this!";
+ var ul = document.createElement("ul");
+ value.map((v)=>{
+ if (v.constructor.name === "Object"){
+ Object.keys(v).forEach((value)=>{
+ var li = document.createElement("li");
+ li.innerText = value + ': ' + v[value];
+ ul.appendChild(li);
+ });
+ } else {
+ var li = document.createElement("li");
+ li.innerText = v;
+ ul.appendChild(li);
+ }
+ });
+ paragraph.appendChild(ul);
} else {
paragraph.innerText = value;
}