Skip to content

Commit

Permalink
Merge branch 'NewUI-dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ewoudwijma committed Aug 13, 2024
2 parents 9e20a53 + 94107f9 commit 0ed1192
Show file tree
Hide file tree
Showing 24 changed files with 2,742 additions and 1,177 deletions.
7 changes: 4 additions & 3 deletions data/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ function appName() {
}

function userFun(buffer) {
if (buffer[0]==1 && jsonValues.pview) {
let pviewNode = gId("pview");

// console.log("userFun", buffer)

if (buffer[0]==1) {
return true;
}

return false;
}
87 changes: 0 additions & 87 deletions data/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,93 +9,6 @@
@license For non GPL-v3 usage, commercial licenses must be purchased. Contact [email protected]
*/

:root,
:root.starbase {
--bg-color: #121212;
--text-color: #cfd096;
--th-color: #c27e66;
--h-color:#c27e66;
--border-color: #cdad6a;
--select-color: #1a8aff; /*used for view buttons*/
--label-color: #83c5eb;
--comment-color: #598a43;
--font-size: 10px;
}
:root.starlight {
--bg-color: linear-gradient(to bottom, #ffbe33 0%, #b60f62 100%);
--text-color: #030303;
--th-color: #b60f6281;
--h-color: #b60f62;
--border-color: #666;
--select-color: #FFFFFF; /*used for view buttons*/
--font-size: 10px;
}
:root.wled {
--bg-color: #121212;
--text-color: #fff;
--th-color: rgb(255, 160, 0);
--h-color: rgb(255, 160, 0);
--border-color: rgb(255, 160, 0);
--select-color: rgb(255, 160, 0);
--font-size: 10px;
}
:root.grayeen {
--bg-color: linear-gradient(to bottom, #979294 0%, #474542 100%);
--text-color: #fbf4f4;
--th-color: #21482b;
--h-color: #21482b;
--border-color: #21482b;
--select-color: #21482b; /*used for view buttons*/
--font-size: 10px;
--font-size-s: 8px; /*var(--font-size-s) not working for some reason */
}
:root.dev {
--bg-color: #121212;
--text-color: #cfd096;
--th-color: #c27e66;
--h-color:#c27e66;
--border-color: #cdad6a;
--select-color: #1a8aff; /*used for view buttons*/
--label-color: #83c5eb;
--comment-color: #598a43;
--font-size: 10px;
}
:root.light {
--bg-color: #fff;
--text-color: #123;
--h-color: #000000;
--th-color: #6d686a81;
--select-color: #6d686a81;
}
:root.dark {
--bg-color: #121212;
--text-color: #696d7d;
}
:root.blue {
--bg-color: #05396B;
--text-color: #E7F1FE;
--th-color: #b60f6281;
--h-color: #b60f62;
--select-color: #b60f6281;
}
:root.pink {
--bg-color: #ffcad4;
--text-color: #e75480;
--select-color: #e75480; /*used for view buttons*/
}
:root.space {
--bg-color: #000;
--text-color: #f2bd16;
--bg-url: url(//space);
--font-family: 'Press Start 2P', cursive;
}
:root.nyan {
--bg-color: #013367;
--text-color: #fff;
--bg-url: url(//nyan);
--font-family: 'Comic Neue', cursive;
}

/* inspired by WLED / MoonModules - temporary */
:root {
--c-1: #111;
Expand Down
1 change: 1 addition & 0 deletions data/index.htm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<!-- <link rel="mask-icon" type="image/x-icon" href="favicon-16x16.png"> for safari tabs? -->
<!-- <link rel="shortcut icon" href="https://ewowi.github.io/StarDocs/assets/images/ui/StarBase/favicon-16x16.png"> -->
<link rel="stylesheet" href="index.css">
<link rel="stylesheet" href="theme.css">
<script src="app.js"></script>
<script src="index.js"></script>

Expand Down
26 changes: 13 additions & 13 deletions data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ async function fetchModel() {
// Replace with call to server websocket
model = await (await fetch('../misc/model.json')).json()

for (let module of model) {
addModule(module)
for (let moduleJson of model) {
addModule(moduleJson)
}
}

Expand Down Expand Up @@ -94,18 +94,18 @@ function ppf() {
}

//used by fetchModel and by makeWS
function addModule(module) {
function addModule(moduleJson) {
// let module = json;
console.log("WS receive createHTML", module);
ppf("WS receive createHTML", module.id);
createHTML(module); //no parentNode

if (module.id == "System") {
console.log("system changes", module);
if (module.view)
savedView = module.view;
if (module.theme)
changeHTMLTheme(module.theme);
console.log("WS receive createHTML", moduleJson);
ppf("WS receive createHTML", moduleJson.id);
createHTML(moduleJson); //no parentNode

if (moduleJson.id == "System") {
console.log("system changes", moduleJson);
if (moduleJson.view)
savedView = moduleJson.view;
if (moduleJson.theme)
changeHTMLTheme(moduleJson.theme);
}

//rerun after each module added
Expand Down
120 changes: 0 additions & 120 deletions data/newui.js

This file was deleted.

12 changes: 8 additions & 4 deletions data/newui.htm → data/newui/index.htm
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@
<meta name="author" content="MoonModules and its contributors">
<title>StarBase💫 by MoonModules 🌔</title>
<link rel="icon" href="https://ewowi.github.io/StarDocs/assets/images/ui/starbase/favicon-16x16.png">
<script src="app.js"></script>
<script src="newui.js"></script>
<link rel="stylesheet" href="mainnav.css">
<script src="index.js"></script>
<script src="theme.js"></script>
<link rel="stylesheet" href="../theme.css">
<script src="mainnav.js"></script>
<link rel="stylesheet" href="mainnav.css">
<script src="modules.js"></script>
<link rel="stylesheet" href="modules.css">
<script src="../app.js"></script>
</head>
<body id="body" onload="onLoad()"></body>
<body id="body" onload="controller.onLoad()"></body>
</html>
Loading

0 comments on commit 0ed1192

Please sign in to comment.