aboutsummaryrefslogtreecommitdiff
path: root/src/js/ui/sections/welcomeSection.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/ui/sections/welcomeSection.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/ui/sections/welcomeSection.js')
-rw-r--r--src/js/ui/sections/welcomeSection.js175
1 files changed, 89 insertions, 86 deletions
diff --git a/src/js/ui/sections/welcomeSection.js b/src/js/ui/sections/welcomeSection.js
index 5636233..025b1e8 100644
--- a/src/js/ui/sections/welcomeSection.js
+++ b/src/js/ui/sections/welcomeSection.js
@@ -18,8 +18,8 @@ var greeting = {
var homeGrid = {
element: "div",
- id: "home-grid",
- innerHTML: `
+ id: "home-grid",
+ innerHTML: `
<button class="menu-clickable" id="#/mixtapes-section" onclick="menusel(this)" style="background-image: url(img/mixtapes-logo.png); background-repeat: round;"></button>
<button class="menu-clickable" id="#/news-section" onclick="menusel(this)" style="background-image: url(img/news-logo.png); background-repeat: round;"></button>
<button class="menu-clickable" id="#/chat-section" onclick="menusel(this)" style="background-image: url(img/chat-logo.png); background-repeat: round;"></button>
@@ -42,89 +42,92 @@ var renderForm = {
`
};
-var welcomeSection = {
- element: "div",
- id: "welcome-section",
- innerHTML: [
- whereAmI,
- greeting,
- homeGrid,
- renderTitle,
- renderForm,
- {
- element: "div",
- className: "results-area",
- innerHTML: [
- {
- elements: "h3",
- innerText: "Results"
- }
- ]
- },
- {
- element: "h3",
- innerText: "Manual scan"
- },
- {
- element: "div",
- id: "manual-scan-section",
- innerHTML: [
- {
- element: "div",
- className: "manual-scan",
- innerHTML: [
- { element:"button", onclick:"scanStellarNetworkForPeers()", innerText:"Check Stellar Network"},
- { element:"button", onclick:"checkLocalNodeInfo()", innerText:"Check local Node"},
- { element:"button", onclick:"checkLocalPeers()", innerText:"Check local Peers"},
- { element:"button", onclick:"checkLocalSchain()", innerText:"Check Local Schain"}
- ]
- }
- ]
- },
- {
- element: "div",
- className: "preview"
- },
- {
- element: "div",
- className: "dialog",
- innerHTML: [
- {
- element: "h3",
- innerText: "Progress"
- },
- {
- element: "progress",
- id: "total-progress",
- value: 0
- },
- {
- element: "progress",
- id: "http-progress",
- value: 0
- },
- {
- element: "pre",
- id: "current-log-message"
- }
- ]
- },
+export function welcomeSection()
+{
+ var welcomeSection = {
+ element: "div",
+ id: "welcome-section",
+ innerHTML: [
+ whereAmI,
+ greeting,
+ homeGrid,
+ renderTitle,
+ renderForm,
+ {
+ element: "div",
+ className: "results-area",
+ innerHTML: [
+ {
+ elements: "h3",
+ innerText: "Results"
+ }
+ ]
+ },
+ {
+ element: "h3",
+ innerText: "Manual scan"
+ },
+ {
+ element: "div",
+ id: "manual-scan-section",
+ innerHTML: [
+ {
+ element: "div",
+ className: "manual-scan",
+ innerHTML: [
+ { element:"button", onclick:"scanStellarNetworkForPeers()", innerText:"Check Stellar Network"},
+ { element:"button", onclick:"checkLocalNodeInfo()", innerText:"Check local Node"},
+ { element:"button", onclick:"checkLocalPeers()", innerText:"Check local Peers"},
+ { element:"button", onclick:"checkLocalSchain()", innerText:"Check Local Schain"}
+ ]
+ }
+ ]
+ },
+ {
+ element: "div",
+ className: "preview"
+ },
+ {
+ element: "div",
+ className: "dialog",
+ innerHTML: [
+ {
+ element: "h3",
+ innerText: "Progress"
+ },
+ {
+ element: "progress",
+ id: "total-progress",
+ value: 0
+ },
+ {
+ element: "progress",
+ id: "http-progress",
+ value: 0
+ },
+ {
+ element: "pre",
+ id: "current-log-message"
+ }
+ ]
+ },
- {
- element: "details",
- id: "logs-area",
- innerHTML: [
- {
- element: "summary",
- innerText: "Logs (click to expand)"
- },
- {
- element: "div",
- id: "logs-area-element"
- }
- ]
- }
- ]
-};
+ {
+ element: "details",
+ id: "logs-area",
+ innerHTML: [
+ {
+ element: "summary",
+ innerText: "Logs (click to expand)"
+ },
+ {
+ element: "div",
+ id: "logs-area-element"
+ }
+ ]
+ }
+ ]
+ };
-makeElement(welcomeSection, document.querySelector('.main'));
+ makeElement(welcomeSection, document.querySelector('.main'));
+}