aboutsummaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-11-30 14:24:18 +0200
committerkaotisk <kaotisk@arching-kaos.org>2024-11-30 14:24:18 +0200
commit3068b57c4841491ae885e555cc5560a1c2f80a9c (patch)
tree81c55efe4d761c2355763a9c228f706aa9f0ced8 /src/js
parent31e92292f140c1e1ee2c7f04e11ba90392f6dab9 (diff)
downloadarching-kaos-web-ui-3068b57c4841491ae885e555cc5560a1c2f80a9c.tar.gz
arching-kaos-web-ui-3068b57c4841491ae885e555cc5560a1c2f80a9c.tar.bz2
arching-kaos-web-ui-3068b57c4841491ae885e555cc5560a1c2f80a9c.zip
Minor updates
- Fix refreshRadio and exported function - Exported function refreshChat - New function debugLog to replace console.log with conditional printing - Licensing to be LibreJS compatible - Minor fixes where applicable (see diff)
Diffstat (limited to 'src/js')
-rw-r--r--src/js/app.js23
-rw-r--r--src/js/arching-kaos-decentralized-radio.js14
-rw-r--r--src/js/arching-kaos-fetch.js27
-rw-r--r--src/js/arching-kaos-generator.js14
-rw-r--r--src/js/arching-kaos-log.js14
-rw-r--r--src/js/arching-kaos-modules-comments.js14
-rw-r--r--src/js/arching-kaos-modules-files.js14
-rw-r--r--src/js/arching-kaos-modules-mixtapes.js16
-rw-r--r--src/js/arching-kaos-modules-news.js14
-rw-r--r--src/js/arching-kaos-modules-references.js17
-rw-r--r--src/js/arching-kaos-spa-router.js14
-rw-r--r--src/js/arching-kaos-stellar-network.js23
-rw-r--r--src/js/arching-kaos-tools.js47
-rw-r--r--src/js/arching-kaos-web-ui-settings.js23
-rw-r--r--src/js/environment-setup.js14
-rw-r--r--src/js/ui/footer.js8
-rw-r--r--src/js/ui/header.js8
-rw-r--r--src/js/ui/main.js8
-rw-r--r--src/js/ui/mainLayout.js8
-rw-r--r--src/js/ui/menu.js17
-rw-r--r--src/js/ui/sections/aboutSection.js8
-rw-r--r--src/js/ui/sections/akNodeInfoSection.js8
-rw-r--r--src/js/ui/sections/chatSection.js8
-rw-r--r--src/js/ui/sections/commentsSection.js8
-rw-r--r--src/js/ui/sections/filesSection.js8
-rw-r--r--src/js/ui/sections/mixtapesSection.js8
-rw-r--r--src/js/ui/sections/myPageSection.js8
-rw-r--r--src/js/ui/sections/newsSection.js8
-rw-r--r--src/js/ui/sections/notFoundSection.js8
-rw-r--r--src/js/ui/sections/radioSection.js8
-rw-r--r--src/js/ui/sections/settingsSection.js24
-rw-r--r--src/js/ui/sections/statsSection.js8
-rw-r--r--src/js/ui/sections/stellarBalancesSection.js8
-rw-r--r--src/js/ui/sections/stellarDataConfigSection.js8
-rw-r--r--src/js/ui/sections/stellarSection.js8
-rw-r--r--src/js/ui/sections/welcomeSection.js8
-rw-r--r--src/js/ui/sections/zchainDataSection.js8
-rw-r--r--src/js/url-generators.js14
-rw-r--r--src/js/utils.js32
39 files changed, 354 insertions, 181 deletions
diff --git a/src/js/app.js b/src/js/app.js
index ceab2bc..a73c0c3 100644
--- a/src/js/app.js
+++ b/src/js/app.js
@@ -1,20 +1,16 @@
-/* Arching Kaos Web UI App Launcher
- *
- * Kaotisk Hund - 2024
- *
- * @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
- *
- *
- * Body and pageLayout resizer to device's resolution.
- *
- * TODO: Figure out why it doesn't work in fullscreen App mode (android)
- *
- */
+// Arching Kaos Web UI App Launcher
+//
+// Kaotisk Hund - 2024
+//
+// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
+//
+
import { locationHashOnChange } from "./arching-kaos-spa-router.js";
import { doubleFloorMenu, menuinit, menusel, stellarSubToggle, modulesSubToggle, exploreSubToggle } from './ui/menu.js';
import { mainLayoutSpawn } from "./ui/mainLayout.js";
import { scanStellarNetworkForPeers } from "./arching-kaos-stellar-network.js";
import { checkLocalNodeInfo, checkLocalPeers, checkLocalSchain, seekZblock } from "./arching-kaos-tools.js";
+import { refreshChat, refreshRadio, setDebug } from "./utils.js";
window.menusel = menusel;
window.locationHashOnChange = locationHashOnChange;
@@ -26,6 +22,9 @@ window.seekZblock = seekZblock;
window.checkLocalNodeInfo = checkLocalNodeInfo;
window.checkLocalPeers = checkLocalPeers;
window.checkLocalSchain = checkLocalSchain;
+window.refreshChat = refreshChat;
+window.refreshRadio = refreshRadio;
+window.setDebug = setDebug;
export function body()
{
diff --git a/src/js/arching-kaos-decentralized-radio.js b/src/js/arching-kaos-decentralized-radio.js
index 061a142..63d2c2a 100644
--- a/src/js/arching-kaos-decentralized-radio.js
+++ b/src/js/arching-kaos-decentralized-radio.js
@@ -1,10 +1,10 @@
-/* Arching Kaos Dentralized Radio
- *
- * Kaotisk Hund - 2024
- *
- * @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
- *
- */
+// Arching Kaos Dentralized Radio
+//
+// Kaotisk Hund - 2024
+//
+// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
+//
+
// var radio = document.querySelector("#radio-player");
// var radioButton = document.querySelector("#radio-button-controller");
diff --git a/src/js/arching-kaos-fetch.js b/src/js/arching-kaos-fetch.js
index 15394b2..5f27728 100644
--- a/src/js/arching-kaos-fetch.js
+++ b/src/js/arching-kaos-fetch.js
@@ -1,12 +1,13 @@
-/* Arching Kaos Fetch
- *
- * Kaotisk Hund - 2024
- *
- * @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
- *
- */
+// Arching Kaos Fetch
+//
+// Kaotisk Hund - 2024
+//
+// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
+//
+
import { archingKaosLog } from "./arching-kaos-log.js";
import { httpProgressPlaceholder, progressPlaceholder } from "./app.js";
+import { debugLog } from "./utils.js";
export function archingKaosFetchJSON( url, callback, params ){
const request = new XMLHttpRequest();
@@ -19,18 +20,18 @@ export function archingKaosFetchJSON( url, callback, params ){
}
});
request.addEventListener("error", ()=>{
- // console.log("An error occured.");
+ debugLog("An error occured.");
});
request.addEventListener("progress", (event)=>{
if (event.lengthComputable && progressPlaceholder()){
httpProgressPlaceholder().value = (event.loaded / event.total) * 100;
} else {
httpProgressPlaceholder().value = 0;
- // console.log("Supposingly zeroed progressPlaceholder");
+ debugLog("Supposingly zeroed progressPlaceholder");
}
});
request.addEventListener("abort", ()=>{
- // console.log("Request aborted.");
+ debugLog("Request aborted.");
});
request.open("GET", url);
request.send();
@@ -48,18 +49,18 @@ export async function archingKaosFetchText( url, callback, params ){
}
});
request.addEventListener("error", ()=>{
- // console.log("An error occured.");
+ debugLog("An error occured.");
});
request.addEventListener("progress", (event)=>{
if (event.lengthComputable && progressPlaceholder()){
httpProgressPlaceholder().value = (event.loaded / event.total) * 100;
} else {
httpProgressPlaceholder.value = 0;
- // console.log("Supposingly zeroed progressPlaceholder");
+ debugLog("Supposingly zeroed progressPlaceholder");
}
});
request.addEventListener("abort", ()=>{
- // console.log("Request aborted.");
+ debugLog("Request aborted.");
});
request.open("GET", url);
request.send();
diff --git a/src/js/arching-kaos-generator.js b/src/js/arching-kaos-generator.js
index a3d1669..d8f2f2b 100644
--- a/src/js/arching-kaos-generator.js
+++ b/src/js/arching-kaos-generator.js
@@ -1,10 +1,10 @@
-/* Arching Kaos Generator
- *
- * Kaotisk Hund - 2024
- *
- * @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
- *
- */
+// Arching Kaos Generator
+//
+// Kaotisk Hund - 2024
+//
+// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
+//
+
export function makeElement(obj, attachTo)
{
if (obj.element !== 'head' && obj.element !== 'body' )
diff --git a/src/js/arching-kaos-log.js b/src/js/arching-kaos-log.js
index e348ee6..104ca30 100644
--- a/src/js/arching-kaos-log.js
+++ b/src/js/arching-kaos-log.js
@@ -1,10 +1,10 @@
-/* Arching Kaos Log
- *
- * Kaotisk Hund - 2024
- *
- * @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
- *
- */
+// Arching Kaos Log
+//
+// Kaotisk Hund - 2024
+//
+// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
+//
+
import { currentLogMessageElement, logsAreaElement } from "./app.js";
import { makeElement } from "./arching-kaos-generator.js";
diff --git a/src/js/arching-kaos-modules-comments.js b/src/js/arching-kaos-modules-comments.js
index 8db1b57..f831cc9 100644
--- a/src/js/arching-kaos-modules-comments.js
+++ b/src/js/arching-kaos-modules-comments.js
@@ -1,10 +1,10 @@
-/* Arching Kaos Module Comments
- *
- * Kaotisk Hund - 2024
- *
- * @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
- *
- */
+// Arching Kaos Module Comments
+//
+// Kaotisk Hund - 2024
+//
+// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
+//
+
import { makeElement } from "./arching-kaos-generator.js";
import {
getFullText,
diff --git a/src/js/arching-kaos-modules-files.js b/src/js/arching-kaos-modules-files.js
index fb325aa..02f183e 100644
--- a/src/js/arching-kaos-modules-files.js
+++ b/src/js/arching-kaos-modules-files.js
@@ -1,10 +1,10 @@
-/* Arching Kaos Module Files
- *
- * Kaotisk Hund - 2024
- *
- * @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
- *
- */
+// Arching Kaos Module Files
+//
+// Kaotisk Hund - 2024
+//
+// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
+//
+
import { getNicknameAssossiatedWithGPG } from "./arching-kaos-tools.js";
import { makeElement } from "./arching-kaos-generator.js";
diff --git a/src/js/arching-kaos-modules-mixtapes.js b/src/js/arching-kaos-modules-mixtapes.js
index bf11d9d..56cdfd6 100644
--- a/src/js/arching-kaos-modules-mixtapes.js
+++ b/src/js/arching-kaos-modules-mixtapes.js
@@ -1,10 +1,10 @@
-/* Arching Kaos Model Mixtapes
- *
- * Kaotisk Hund - 2024
- *
- * @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
- *
- */
+// Arching Kaos Model Mixtapes
+//
+// Kaotisk Hund - 2024
+//
+// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
+//
+
import { makeElement } from "./arching-kaos-generator.js";
import { getIPFSURL } from "./url-generators.js";
import { addMixtapeID, setMixtape, getMixtapes } from "./environment-setup.js";
@@ -57,7 +57,7 @@ export function akModuleMixtapes(zblockIPFSHash, zblockObject, blockObject, json
audioDuration:audio.duration
});
}
- /* console.log(
+ /* debugLog(
zblockIPFSHash+"'s duration is: "+
audio.duration +
" Ceiled: " + Math.ceil(audio.duration) +
diff --git a/src/js/arching-kaos-modules-news.js b/src/js/arching-kaos-modules-news.js
index 49dfb0a..f9143bc 100644
--- a/src/js/arching-kaos-modules-news.js
+++ b/src/js/arching-kaos-modules-news.js
@@ -1,10 +1,10 @@
-/* Arching Kaos Module News
- *
- * Kaotisk Hund - 2024
- *
- * @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
- *
- */
+// Arching Kaos Module News
+//
+// Kaotisk Hund - 2024
+//
+// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
+//
+
import { makeElement } from "./arching-kaos-generator.js";
import { archingKaosFetchText } from "./arching-kaos-fetch.js";
import {
diff --git a/src/js/arching-kaos-modules-references.js b/src/js/arching-kaos-modules-references.js
index c6aca8a..6d70c9a 100644
--- a/src/js/arching-kaos-modules-references.js
+++ b/src/js/arching-kaos-modules-references.js
@@ -1,18 +1,19 @@
-/* Arching Kaos Module References
- *
- * Kaotisk Hund - 2024
- *
- * @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
- *
- */
+// Arching Kaos Module References
+//
+// Kaotisk Hund - 2024
+//
+// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
+//
+
import {
getReferences,
setReference,
getReference
} from "./environment-setup.js";
+import { debugLog } from "./utils.js";
export function resolveReferences(){
- console.log(getReferences());
+ debugLog(getReferences());
const references = getReferences();
for( var entry = 0; entry < references.length; entry++ ){
var comment = document.querySelector('#comment-'+references[entry].dataExpansion.reference);
diff --git a/src/js/arching-kaos-spa-router.js b/src/js/arching-kaos-spa-router.js
index d1cf2a4..c6770f4 100644
--- a/src/js/arching-kaos-spa-router.js
+++ b/src/js/arching-kaos-spa-router.js
@@ -1,10 +1,10 @@
-/* Arching Kaos Single Page Application Router
- *
- * Kaotisk Hund - 2024
- *
- * @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
- *
- */
+// Arching Kaos Single Page Application Router
+//
+// Kaotisk Hund - 2024
+//
+// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
+//
+
/*
* A new feature for a new future:
*
diff --git a/src/js/arching-kaos-stellar-network.js b/src/js/arching-kaos-stellar-network.js
index a08147e..a20365c 100644
--- a/src/js/arching-kaos-stellar-network.js
+++ b/src/js/arching-kaos-stellar-network.js
@@ -1,10 +1,10 @@
-/* Arching Kaos Stellar Network
- *
- * Kaotisk Hund - 2024
- *
- * @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
- *
- */
+// Arching Kaos Stellar Network
+//
+// Kaotisk Hund - 2024
+//
+// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
+//
+
import { archingKaosLog } from "./arching-kaos-log.js";
import { archingKaosFetchJSON } from "./arching-kaos-fetch.js";
import {
@@ -24,6 +24,7 @@ import {
import { makeElement } from "./arching-kaos-generator.js";
import { getConfiguration } from "./arching-kaos-tools.js";
+import { debugLog } from "./utils.js";
var lastPage = '';
@@ -69,8 +70,8 @@ function renderConfigurationIPNSLinkAndProceed(json, stellarAddress){
renderStellarAddress(stellarAddress);
document.querySelector('#'+stellarAddress).style="color: #3dbb3d;"
increaseStellarNetworkConfiguredAddresses();
- console.log(atob(json.value));
- console.log(stellarAddress);
+ debugLog(atob(json.value));
+ debugLog(stellarAddress);
getConfiguration(atob(json.value),stellarAddress);
}
@@ -128,7 +129,7 @@ function steptwo(i){
}
function letme(a){
- console.log("HERE WE GO");
+ debugLog("HERE WE GO");
server.accounts()
.accountId(a)
.call()
@@ -190,7 +191,7 @@ function connect(){
// showStellar();
// } else {
const result = retrievePublicKey();
-// console.log(result);
+// debugLog(result);
// }
}
diff --git a/src/js/arching-kaos-tools.js b/src/js/arching-kaos-tools.js
index 0901852..8a80d5b 100644
--- a/src/js/arching-kaos-tools.js
+++ b/src/js/arching-kaos-tools.js
@@ -1,10 +1,10 @@
-/* Arching Kaos Tools
- *
- * Kaotisk Hund - 2024
- *
- * @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
- *
- */
+// Arching Kaos Tools
+//
+// Kaotisk Hund - 2024
+//
+// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
+//
+
import { archingKaosLog } from "./arching-kaos-log.js";
import { makeElement } from "./arching-kaos-generator.js";
import { progressPlaceholder, resultsArea, aknet } from "./app.js";
@@ -31,6 +31,7 @@ import { akModuleMixtapes } from "./arching-kaos-modules-mixtapes.js";
import { akModuleNews } from "./arching-kaos-modules-news.js";
import { storeReference, resolveReferences } from "./arching-kaos-modules-references.js";
import { getSettings } from "./arching-kaos-web-ui-settings.js";
+import { debugLog } from "./utils.js";
var settings = getSettings();
@@ -81,7 +82,7 @@ function renderStellarAddressPlaceholder(stellarAddress){
function nodeInfoRender(json, stellarAddress){
var divs = renderStellarAddressPlaceholder(stellarAddress);
- console.log(json);
+ debugLog(json);
const keys = Object.keys(json);
for( var i = 0; i < keys.length; i++ )
{
@@ -115,9 +116,9 @@ function nodeInfoRenderAndProceed(json, stellarAddress){
}
function renderZblockAndProceed(json, params){
- console.log(typeof(params))
+ debugLog(typeof(params))
const [zblockIPFSHash, group, recursive] = params;
- console.log(group);
+ debugLog(group);
var zblockElement = document.querySelector('#zb-'+zblockIPFSHash);
if(json.block){
var p = {
@@ -222,7 +223,7 @@ function blockRenderAndProceed(json, params){
resolveReferences();
//radioLoad();
} else {
- console.log("deep in :" +group);
+ debugLog("deep in :" +group);
if (recursive) seekZblock(json.previous, [group]);
}
}
@@ -254,7 +255,7 @@ function seekZchain(zchainIPNSLink,stellarAddress,json){
makeElement(p, details);
}
archingKaosLog("Seeking zchain " + zchainIPNSLink + "...");
- console.log(json)
+ debugLog(json)
archingKaosFetchJSON(getIPNSURL(zchainIPNSLink), seekZblock, [zchainIPNSLink, stellarAddress, json]);
}
@@ -267,11 +268,11 @@ function checkIfGenesis(zblockIPFSHash){
}
function seekBlock(blockIPFSHash, zblockIPFSHash, group, zblockObject, recursive){
- console.log(blockIPFSHash);
- console.log(zblockIPFSHash);
- console.log(group);
- console.log(zblockObject);
- console.log(recursive);
+ debugLog(blockIPFSHash);
+ debugLog(zblockIPFSHash);
+ debugLog(group);
+ debugLog(zblockObject);
+ debugLog(recursive);
archingKaosLog("Seeking block "+blockIPFSHash+"...");
// detailsPlace = document.querySelector('#zb-'+zblockIPFSHash);
progressPlaceholder().max++;
@@ -317,7 +318,7 @@ function renderGroupOnDataSection(group){
};
makeElement(details, divs);
} else {
- //console.log('Else got hit in seekZchain');
+ //debugLog('Else got hit in seekZchain');
return 0;
}
}
@@ -336,8 +337,8 @@ function renderZblockUnderGroup(zblock, group){
export function seekZblock(zblockIPFSHash, params){
var [group, recursive=true] = params;
- console.log(params)
- console.log(group)
+ debugLog(params)
+ debugLog(group)
// const [zchainIPNSLink, stellarAddress, recursive] = params;
renderGroupOnDataSection(group);
@@ -480,7 +481,7 @@ function sblockExpanding(json, args){
function crawlSchain(sblockHash){
var shatest = /0{128}/
if ( shatest.test(sblockHash) ){
- console.log('genesis!!!');
+ debugLog('genesis!!!');
} else {
setZchainLoadingStatus(sblockHash, {loading : "started"});
increaseZchainsFound();
@@ -524,9 +525,9 @@ export function checkLocalNodeInfo(){
export function checkLocalSchain(){
archingKaosLog("Querying for schain...");
- console.log(settings);
+ debugLog(settings);
var url=settings.ak.connect.list[settings.ak.connect.active]+'/v0/slatest';
- console.log(url);
+ debugLog(url);
archingKaosFetchJSON(url, initCrawlSchain);
archingKaosLog("Querying for schain... Done!");
}
diff --git a/src/js/arching-kaos-web-ui-settings.js b/src/js/arching-kaos-web-ui-settings.js
index 0435de4..ddee8f8 100644
--- a/src/js/arching-kaos-web-ui-settings.js
+++ b/src/js/arching-kaos-web-ui-settings.js
@@ -1,10 +1,10 @@
-/* Arching Kaos Settings
- *
- * Kaotisk Hund - 2024
- *
- * @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
- *
- */
+// Arching Kaos Settings
+//
+// Kaotisk Hund - 2024
+//
+// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
+//
+
/*
* We will be using browser's localStorage for the clients to configure their
* desired way to visit the web-ui.
@@ -24,6 +24,7 @@
*/
import { makeElement } from "./arching-kaos-generator.js";
import { getSettingsPage } from "./ui/sections/settingsSection.js";
+import { debugLog } from "./utils.js";
var default_settings = {
ipfs: {
@@ -158,7 +159,7 @@ function renderAssets(container, value){
function settingPlaceToDOM(key, value){
var container = document.createElement("details");
var summary = document.createElement("summary");
- console.log("~~KEY: "+key);
+ debugLog("~~KEY: "+key);
summary.innerText=key;
container.appendChild(summary);
if ( Array.isArray(value) ){
@@ -174,7 +175,7 @@ function settingPlaceToDOM(key, value){
});
container.appendChild(ul);
} else if (value.constructor.name === "Object" ) {
- console.log("KEY: "+key);
+ debugLog("KEY: "+key);
switch (key){
case 'ipfs':
makeElement({ element:"h4",innerText:"Gateway" }, container);
@@ -205,7 +206,7 @@ function settingPlaceToDOM(key, value){
container.innerText += " unknonwn lol";
}
} else {
- console.log(`Settings value: ${value}, type: ${typeof(value)}`);
+ debugLog(`Settings value: ${value}, type: ${typeof(value)}`);
// container.innerText = value;
}
getSettingsPage().appendChild(container);
@@ -235,7 +236,7 @@ export function getSettings()
return default_settings;
}
-// console.log(settings.ipfsGatewayAddress[settings.ipfsSelectedGatewayAddress]);
+// debugLog(settings.ipfsGatewayAddress[settings.ipfsSelectedGatewayAddress]);
// vim: tabstop=4 shiftwidth=4 expandtab softtabstop=4
// @license-end
diff --git a/src/js/environment-setup.js b/src/js/environment-setup.js
index 923676c..43563ab 100644
--- a/src/js/environment-setup.js
+++ b/src/js/environment-setup.js
@@ -1,10 +1,10 @@
-/* Arching Kaos Setup
- *
- * Kaotisk Hund - 2024
- *
- * @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
- *
- */
+// Arching Kaos Setup
+//
+// Kaotisk Hund - 2024
+//
+// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
+//
+
var mixtapeIds = new Array;
export function addMixtapeID(zblockIPFSHash)
{
diff --git a/src/js/ui/footer.js b/src/js/ui/footer.js
index fbde422..c447189 100644
--- a/src/js/ui/footer.js
+++ b/src/js/ui/footer.js
@@ -1,3 +1,10 @@
+// Arching Kaos Footer
+//
+// Kaotisk Hund - 2024
+//
+// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
+//
+
import { makeElement } from "../arching-kaos-generator.js";
export function footerSpawn()
@@ -44,3 +51,4 @@ export function footerSpawn()
makeElement(footer, document.querySelector('.footer'));
}
+// @license-end
diff --git a/src/js/ui/header.js b/src/js/ui/header.js
index 27c16ac..03b2332 100644
--- a/src/js/ui/header.js
+++ b/src/js/ui/header.js
@@ -1,3 +1,10 @@
+// Arching Kaos Header
+//
+// Kaotisk Hund - 2024
+//
+// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
+//
+
import { makeElement } from "../arching-kaos-generator.js";
export function headerSpawn()
@@ -17,3 +24,4 @@ export function headerSpawn()
makeElement(header, document.querySelector('#logo-title-placeholder'));
}
+// @license-end
diff --git a/src/js/ui/main.js b/src/js/ui/main.js
index a24d77e..a1a9ddc 100644
--- a/src/js/ui/main.js
+++ b/src/js/ui/main.js
@@ -1,3 +1,10 @@
+// Arching Kaos Main
+//
+// Kaotisk Hund - 2024
+//
+// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
+//
+
import { aboutSection } from "./sections/aboutSection.js";
import { akNodeInfoSection } from "./sections/akNodeInfoSection.js";
import { chatSection } from "./sections/chatSection.js";
@@ -36,3 +43,4 @@ export function mainSpawn()
welcomeSection();
zchainDataSection();
}
+// @license-end
diff --git a/src/js/ui/mainLayout.js b/src/js/ui/mainLayout.js
index 66f1d25..715d95c 100644
--- a/src/js/ui/mainLayout.js
+++ b/src/js/ui/mainLayout.js
@@ -1,3 +1,10 @@
+// Arching Kaos Main Layout
+//
+// Kaotisk Hund - 2024
+//
+// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0
+//
+
import { headerSpawn } from "./header.js";
import { menuSpawn } from "./menu.js";
import { mainSpawn } from "./main.js";
@@ -10,3 +17,4 @@ export function mainLayoutSpawn()
mainSpawn();
footerSpawn();
}
+// @license-end
diff --git a/src/js/ui/menu.js b/src/js/ui/menu.js
index 1c4a8e3..6d2efd6 100644
--- a/src/js/ui/menu.js
+++ b/