aboutsummaryrefslogtreecommitdiff
path: root/src/js/arching-kaos-web-ui-settings.js
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-11-30 00:33:20 +0200
committerkaotisk <kaotisk@arching-kaos.org>2024-11-30 00:33:20 +0200
commitdcc6f35266de1f56d7e9536311f0ff56b57c0fdc (patch)
tree748932c6fc1c0558dd6e36fff69c2bc1eafc84a0 /src/js/arching-kaos-web-ui-settings.js
parent6fda741ab062decc2351a3707c7a57cdcf25a18b (diff)
downloadarching-kaos-web-ui-dcc6f35266de1f56d7e9536311f0ff56b57c0fdc.tar.gz
arching-kaos-web-ui-dcc6f35266de1f56d7e9536311f0ff56b57c0fdc.tar.bz2
arching-kaos-web-ui-dcc6f35266de1f56d7e9536311f0ff56b57c0fdc.zip
More refactoring and fixing a bug on spa-router
Diffstat (limited to 'src/js/arching-kaos-web-ui-settings.js')
-rw-r--r--src/js/arching-kaos-web-ui-settings.js31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/js/arching-kaos-web-ui-settings.js b/src/js/arching-kaos-web-ui-settings.js
index c6a5399..c940f31 100644
--- a/src/js/arching-kaos-web-ui-settings.js
+++ b/src/js/arching-kaos-web-ui-settings.js
@@ -23,7 +23,7 @@
*
*/
import { makeElement } from "./arching-kaos-generator.js";
-import { settingsPage } from "./ui/sections/settingsSection.js";
+import { getSettingsPage } from "./ui/sections/settingsSection.js";
var default_settings = {
ipfs: {
@@ -96,12 +96,8 @@ var default_settings = {
//
// All comments above are replaced by temporary initializing without saving
// anything in the localStorage
-export function getSettings()
-{
- return default_settings;
-}
-export var settings = default_settings;
+var settings = default_settings;
// Also, remove any settings stored from previous runs
window.localStorage.removeItem("ak-settings");
@@ -206,21 +202,26 @@ function settingPlaceToDOM(key, value){
console.log(`Settings value: ${value}, type: ${typeof(value)}`);
// container.innerText = value;
}
- settingsPage().appendChild(container);
+ getSettingsPage().appendChild(container);
}
-settingsKeys.forEach(
- (value) => {
- settingPlaceToDOM(value, settings[value]);
- }
-);
+// settingsKeys.forEach(
+// (value) => {
+// settingPlaceToDOM(value, settings[value]);
+// }
+// );
/* Small dump as pre text */
-var predump = document.createElement('pre');
-predump.innerText = JSON.stringify(settings, null, 2);
-settingsPage().appendChild(predump);
+// var predump = document.createElement('pre');
+// predump.innerText = JSON.stringify(settings, null, 2);
+// getSettingsPage().appendChild(predump);
/* END of: Small dump as pre text */
+export function getSettings()
+{
+ return default_settings;
+}
+
// console.log(settings.ipfsGatewayAddress[settings.ipfsSelectedGatewayAddress]);
// vim: tabstop=4 shiftwidth=4 expandtab softtabstop=4