diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-07-13 18:15:25 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-07-13 18:15:25 +0300 |
commit | 908225b0bf02079901308eea2b0735bfd7373901 (patch) | |
tree | 4f0a9ee795ab8186d4af90cb64ff818b39ebc500 /src/js/arching-kaos-web-ui-settings.js | |
parent | 96cd1935f750a875c2bce348958f954a6b2b495b (diff) | |
download | arching-kaos-web-ui-908225b0bf02079901308eea2b0735bfd7373901.tar.gz arching-kaos-web-ui-908225b0bf02079901308eea2b0735bfd7373901.tar.bz2 arching-kaos-web-ui-908225b0bf02079901308eea2b0735bfd7373901.zip |
reworking settings
Diffstat (limited to 'src/js/arching-kaos-web-ui-settings.js')
-rw-r--r-- | src/js/arching-kaos-web-ui-settings.js | 97 |
1 files changed, 96 insertions, 1 deletions
diff --git a/src/js/arching-kaos-web-ui-settings.js b/src/js/arching-kaos-web-ui-settings.js index 3338d0f..e5f24a9 100644 --- a/src/js/arching-kaos-web-ui-settings.js +++ b/src/js/arching-kaos-web-ui-settings.js @@ -16,6 +16,61 @@ * */ var default_settings = { + ipfs: { + gateway: { + list: [ + 'https://ipfs.arching-kaos.com/', + 'http://gw.ipfs.z.kaotisk-hund.com/', + 'http://localhost:8080/' + ], + active: 1 + } + }, + stellar: { + asset: { + list: [ + { + code: 'ARCHINGKAOS', + issuer: 'GB4QVKD6NW3CSNO5TNPARAWNPPXOPSSTKB35XCWB7PUNBIQTK3DVELB2' + }, + { + code: 'KAOTISKHUND', + issuer: 'GDLJKMETTIXAVTZ2XXR2LHUITT7GZBNWEKQDN7V7SP4MURVY6266BIMO' + } + ], + active: 0 + }, + variableNames: { + list: [ + 'config', + 'ak-config', + 'kh-config' + ], + active: 0 + }, + horizon: { + list: [ + 'https://horizon.stellar.org/', + 'http://horizon.stellar.z.kaotisk-hund.com/' + ], + active: 0 + }, + scan: true + }, + ak: { + settings : { + seekDepth: 10, + }, + connect: { + list: [ + 'http://127.0.0.1:8610', + 'http://[fc59:6076:6299:6776:c13d:fbb2:1226:ead0]:8610', + 'http://api.aknet.z.kaotisk-hund.com/' + ], + active: 0 + }, + scan: false + }, ipfsGatewayAddress: [ 'https://ipfs.arching-kaos.com/', 'http://gw.ipfs.z.kaotisk-hund.com/', @@ -144,7 +199,47 @@ function settingPlaceToDOM(key, value){ ul.appendChild(li); } }); - paragraph.appendChild(ul); + container.appendChild(ul); + } else if (value.constructor.name === "Object" ) { + console.log("KEY: "+key); + switch (key){ + case 'ipfs': + var label = document.createElement('label'); + label.innerText = "Gateway"; + container.appendChild(label); + renderList(container, value.gateway); + + break; + case 'stellar': + var label = document.createElement('label'); + label.innerText = "Asset"; + container.appendChild(label); + renderAssets(container, value.asset); + + var label = document.createElement('label'); + label.innerText = "Variable Names"; + container.appendChild(label); + renderList(container, value.variableNames); + + var label = document.createElement('label'); + label.innerText = "Horizon"; + container.appendChild(label); + renderList(container, value.horizon); + + var label = document.createElement('label'); + label.innerText = "Scan"; + container.appendChild(label); + renderCheck(container, value.scan); + break; + case 'ak': + var label = document.createElement('label'); + label.innerText = "Connect"; + container.appendChild(label); + renderList(container, value.connect); + break; + default: + container.innerText += " unknonwn lol"; + } } else { container.innerText = value; } |