aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2025-03-15 16:02:57 +0200
committerkaotisk <kaotisk@arching-kaos.org>2025-03-15 16:02:57 +0200
commit608f9d74bb6891a62a6acce52931286e5528fa18 (patch)
tree9a9226ae8e1fdd982a421e2ac64c0bea267dbd10
parenteaf73f0a3e7bd0a5b794b97d1a91554be0c74b63 (diff)
downloadarching-kaos-web-ui-608f9d74bb6891a62a6acce52931286e5528fa18.tar.gz
arching-kaos-web-ui-608f9d74bb6891a62a6acce52931286e5528fa18.tar.bz2
arching-kaos-web-ui-608f9d74bb6891a62a6acce52931286e5528fa18.zip
markdown zblock renderer+section
-rw-r--r--src/js/arching-kaos-tools.js7
-rw-r--r--src/js/ui/main.js2
-rw-r--r--src/js/ui/menu.js2
3 files changed, 10 insertions, 1 deletions
diff --git a/src/js/arching-kaos-tools.js b/src/js/arching-kaos-tools.js
index 2dfaec6..c8ebfb9 100644
--- a/src/js/arching-kaos-tools.js
+++ b/src/js/arching-kaos-tools.js
@@ -29,6 +29,7 @@ import { akModuleComments } from "./arching-kaos-modules-comments.js";
import { akModuleFiles } from "./arching-kaos-modules-files.js";
import { akModuleMixtapes } from "./arching-kaos-modules-mixtapes.js";
import { akModuleNews } from "./arching-kaos-modules-news.js";
+import { akModuleMarkdown } from "./arching-kaos-modules-markdown.js";
import { storeReference, resolveReferences } from "./arching-kaos-modules-references.js";
import { getSettings } from "./arching-kaos-web-ui-settings.js";
import { debugLog } from "./utils.js";
@@ -390,7 +391,7 @@ function renderGroupOnDataSection(group)
{ element:'summary', innerText: group_render }
]
};
- makeElement(details, divs);
+ makeElement(details, divs.querySelector('.content'));
}
else
{
@@ -449,6 +450,10 @@ function renderZblockAsModule(json, params)
{
akModuleNews(zblockIPFSHash, zblockObject, blockObject, json);
}
+ else if (action == "markdown/add")
+ {
+ akModuleMarkdown(zblockIPFSHash, zblockObject, blockObject, json);
+ }
else if (action == "comments/add")
{
akModuleComments(zblockIPFSHash,blockObject, json);
diff --git a/src/js/ui/main.js b/src/js/ui/main.js
index a1a9ddc..f38bb16 100644
--- a/src/js/ui/main.js
+++ b/src/js/ui/main.js
@@ -22,6 +22,7 @@ import { stellarDataConfigSection } from "./sections/stellarDataConfigSection.js
import { stellarSection } from "./sections/stellarSection.js";
import { welcomeSection } from "./sections/welcomeSection.js";
import { zchainDataSection } from "./sections/zchainDataSection.js";
+import { markdownSection } from "./sections/markdownSection.js";
export function mainSpawn()
{
@@ -29,6 +30,7 @@ export function mainSpawn()
akNodeInfoSection();
chatSection();
commentsSection();
+ markdownSection()
filesSection();
mixtapesSection();
newsSection();
diff --git a/src/js/ui/menu.js b/src/js/ui/menu.js
index 6d2efd6..91be65f 100644
--- a/src/js/ui/menu.js
+++ b/src/js/ui/menu.js
@@ -79,6 +79,7 @@ export function menuSpawn()
{ element:'button', onclick:"modulesSubToggle()", innerText:".."},
{ element:'button', onclick:'menusel({id:"#/mixtapes-section"})', innerText:"Mixtapes"},
{ element:'button', onclick:'menusel({id:"#/news-section"})', innerText:"News"},
+ { element:'button', onclick:'menusel({id:"#/markdown-section"})', innerText:"Markdown"},
{ element:'button', onclick:'menusel({id:"#/comments-section"})', innerText:"Comments"},
{ element:'button', onclick:'menusel({id:"#/files-section"})', innerText:"Files"}
]
@@ -156,6 +157,7 @@ export function menuids()
'#news-section',
'#comments-section',
'#stats-section',
+ '#markdown-section',
'#mixtapes-section',
'#chat-section',
'#radio-section',