aboutsummaryrefslogtreecommitdiff
path: root/public/assets
diff options
context:
space:
mode:
authorjakobst1n <jakob.stendahl@outlook.com>2018-09-07 00:32:51 +0200
committerjakobst1n <jakob.stendahl@outlook.com>2018-09-07 00:32:51 +0200
commit78d7c8d75a5f55ab56dd018edc85ebce9aa033bb (patch)
tree2ad9da977667b79236cfdd827d0446a5bf9fea18 /public/assets
downloadLuxcena-Neo-78d7c8d75a5f55ab56dd018edc85ebce9aa033bb.tar.gz
Luxcena-Neo-78d7c8d75a5f55ab56dd018edc85ebce9aa033bb.zip
:construction: Add pre-v1 project
Because of some stupid mistakes with the repo, I decided to delete the git history. Create a new, fresh repo, and move all the code there. Since all this is pre-v1, everything is in a testing-phase anyways. So i do not think we are going to feel the need for any history. The old repo is renamed to Luxcena-Neo-Old, and will be there until i convince myself i won't need the history.
Diffstat (limited to 'public/assets')
-rw-r--r--public/assets/css/bundle.css368
-rw-r--r--public/assets/js/bundle.js428
-rw-r--r--public/assets/logo/0.5x/Icon@0.5x.pngbin0 -> 18002 bytes
-rw-r--r--public/assets/logo/150h/Icon.pngbin0 -> 3731 bytes
-rw-r--r--public/assets/logo/1x/Icon.pngbin0 -> 41166 bytes
5 files changed, 796 insertions, 0 deletions
diff --git a/public/assets/css/bundle.css b/public/assets/css/bundle.css
new file mode 100644
index 0000000..fc0b937
--- /dev/null
+++ b/public/assets/css/bundle.css
@@ -0,0 +1,368 @@
+.general header, .general main, .general footer {
+ padding-left: 300px; }
+
+.general header .brand-logo {
+ padding-left: 15px; }
+
+@media only screen and (max-width: 992px) {
+ .general header, .general main, .general footer {
+ padding-left: 0; } }
+
+.general .user-view {
+ margin-top: 5px;
+ height: 150px; }
+
+.general .user-view .background {
+ margin-left: 85px; }
+
+@keyframes highlightNew {
+ 0% {
+ background-color: #ffc107; }
+ 100% {
+ background-color: white; } }
+
+.general .newLogEntry {
+ -webkit-animation-name: highlightNew;
+ /* Safari 4.0 - 8.0 */
+ -webkit-animation-duration: 4s;
+ /* Safari 4.0 - 8.0 */
+ animation-name: highlightNew;
+ animation-duration: 4s; }
+
+#scripts .script-list .badge {
+ margin-left: 0;
+ float: none; }
+
+#scripts .card {
+ /*margin-bottom: 60px;*/ }
+
+@media only screen and (max-width: 599px) {
+ #scripts .card-action {
+ border-top: 0 !important;
+ padding: 0 !important;
+ height: 0;
+ transition: padding 0.5s ease 0s, height 0.5s ease 0s; }
+ #scripts .card-action a i {
+ transform: scale(0);
+ transition: transform 0.1s ease 0.1s; }
+ #scripts .card:hover > .card-action {
+ height: 55px;
+ padding: 16px 24px !important; }
+ #scripts .card:hover > .card-action > a > i {
+ transform: scale(1); } }
+
+.neo_ide html,
+.neo_ide body {
+ height: 100%;
+ font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
+ padding: 0;
+ margin: 0;
+ /*margin-top: -20px;*/
+ overflow: auto; }
+
+.neo_ide #editor {
+ width: 100%;
+ height: 100%;
+ margin: -10px; }
+
+.neo_ide .page-container {
+ display: flex;
+ flex-direction: column;
+ justify-content: center; }
+
+.neo_ide .nav-container {
+ width: 100%;
+ height: 45px;
+ background-color: #333333; }
+ .neo_ide .nav-container ul {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ flex: 1;
+ align-self: center;
+ width: 100%;
+ list-style: none; }
+ .neo_ide .nav-container ul .left {
+ color: white;
+ padding: 15px;
+ margin-left: -40px;
+ margin-top: -19px;
+ font-size: 20px; }
+ .neo_ide .nav-container ul .center {
+ color: white; }
+ .neo_ide .nav-container ul .right {
+ width: 80px;
+ margin-right: 174px;
+ color: white; }
+ .neo_ide .nav-container ul .right .button {
+ padding: 15px;
+ margin-top: -15px; }
+ .neo_ide .nav-container .fileName {
+ color: grey; }
+ .neo_ide .nav-container ul .button:hover {
+ background-color: black; }
+
+@keyframes menuBarIn {
+ from {
+ height: 0; }
+ to {
+ height: 25px; } }
+
+@keyframes menuBarOut {
+ from {
+ height: 25px; }
+ to {
+ height: 0; } }
+
+.neo_ide .menuBarIn {
+ animation-name: menuBarIn;
+ animation-duration: 0.5s;
+ height: 25px !important; }
+
+.neo_ide .menuBarOut {
+ animation-name: menuBarOut;
+ animation-duration: 0.5s;
+ height: 0px !important; }
+
+.neo_ide .menubar-container {
+ background-color: #4e4e4e;
+ height: 0; }
+ .neo_ide .menubar-container ul {
+ display: flex;
+ flex-direction: row;
+ flex: 1;
+ width: 100%;
+ list-style: none;
+ margin-top: 2px;
+ margin-left: -30px; }
+ .neo_ide .menubar-container .button {
+ background-color: #3e3e3e;
+ color: white;
+ padding: 3px 10px 3px 10px;
+ margin-right: 4px;
+ font-size: 13px;
+ border-radius: 7px; }
+ .neo_ide .menubar-container .button:hover {
+ background-color: black; }
+
+.neo_ide .panel-container {
+ display: flex;
+ flex-direction: column;
+ flex: 1;
+ overflow: hidden; }
+ .neo_ide .panel-container .panel-top {
+ flex: 0 0 auto;
+ padding: 10px;
+ height: 80%;
+ width: 100%;
+ white-space: nowrap;
+ background: #838383;
+ color: white; }
+ .neo_ide .panel-container .splitter {
+ flex: 0 0 auto;
+ margin-top: -20px;
+ height: 25px;
+ background: url(https://raw.githubusercontent.com/RickStrahl/jquery-resizable/master/assets/hsizegrip.png) center center no-repeat #535353;
+ cursor: row-resize; }
+ .neo_ide .panel-container .splitter .text {
+ margin-left: 10px;
+ margin-top: 4px;
+ color: #cccccc; }
+ .neo_ide .panel-container .splitter .text span {
+ margin-left: 5px; }
+ .neo_ide .panel-container .panel-bottom {
+ flex: 1 1 auto;
+ padding: 10px;
+ /*min-height: 200px;*/
+ background: black;
+ color: white;
+ overflow-y: scroll; }
+ .neo_ide .panel-container .panel-bottom pre {
+ margin-top: -10px; }
+ .neo_ide .panel-container .panel-bottom pre .stdout {
+ color: white; }
+ .neo_ide .panel-container .panel-bottom pre .stderr {
+ color: red; }
+ .neo_ide .panel-container .panel-bottom pre .close {
+ color: yellow; }
+
+.neo_ide label {
+ font-size: 1.2em;
+ display: block;
+ font-weight: bold;
+ margin: 30px 0 10px; }
+
+.neo_ide .page-loader {
+ position: absolute;
+ margin: 0;
+ padding: 0;
+ border: 0;
+ width: 100vw;
+ height: 100vh;
+ background-color: #1fa2ed;
+ color: #fff; }
+ .neo_ide .page-loader .loader {
+ display: flex;
+ justify-content: center;
+ flex-flow: nowrap column;
+ align-items: center;
+ min-height: 100vh; }
+ .neo_ide .page-loader .loading {
+ display: flex;
+ margin: 24px 0; }
+ .neo_ide .page-loader .loading__element {
+ font: normal 100 2rem/1 Roboto;
+ letter-spacing: .5em; }
+ .neo_ide .page-loader [class*="el"] {
+ animation: bouncing 3s infinite ease; }
+ .neo_ide .page-loader .el1 {
+ animation-delay: 0.1s; }
+ .neo_ide .page-loader .el2 {
+ animation-delay: 0.2s; }
+ .neo_ide .page-loader .el3 {
+ animation-delay: 0.3s; }
+ .neo_ide .page-loader .el4 {
+ animation-delay: 0.4s; }
+ .neo_ide .page-loader .el5 {
+ animation-delay: 0.5s; }
+ .neo_ide .page-loader .el6 {
+ animation-delay: 0.6s; }
+ .neo_ide .page-loader .el7 {
+ animation-delay: 0.7s; }
+ .neo_ide .page-loader .el8 {
+ animation-delay: 0.8s; }
+ .neo_ide .page-loader .el9 {
+ animation-delay: 0.9s; }
+ .neo_ide .page-loader .el10 {
+ animation-delay: 1s; }
+ .neo_ide .page-loader .el11 {
+ animation-delay: 1.1s; }
+ .neo_ide .page-loader .el12 {
+ animation-delay: 1.2s; }
+ .neo_ide .page-loader .el13 {
+ animation-delay: 1.3s; }
+ .neo_ide .page-loader .el14 {
+ animation-delay: 1.4s; }
+ .neo_ide .page-loader .el15 {
+ animation-delay: 1.5s; }
+ .neo_ide .page-loader .el16 {
+ animation-delay: 1.6s; }
+ .neo_ide .page-loader .el17 {
+ animation-delay: 1.7s; }
+ .neo_ide .page-loader .el18 {
+ animation-delay: 1.8s; }
+ .neo_ide .page-loader .el19 {
+ animation-delay: 1.9s; }
+
+@keyframes bouncing {
+ 0%, 100% {
+ transform: scale3d(1, 1, 1); }
+ 50% {
+ transform: scale3d(0, 0, 1); } }
+ .neo_ide .page-loader .current-event {
+ color: rgba(255, 255, 255, 0.53);
+ font: normal 100 1rem/1 Roboto;
+ letter-spacing: .1em; }
+
+#update * {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ box-sizing: border-box; }
+ #update *:before, #update *:after {
+ box-sizing: inherit; }
+
+#update html {
+ width: 100vw;
+ height: 100vh; }
+
+#update body {
+ background-color: #1fa2ed;
+ color: #fff; }
+
+#update .start-screen {
+ display: flex;
+ justify-content: center;
+ flex-flow: nowrap column;
+ align-items: center;
+ min-height: 100vh; }
+
+#update .loading {
+ display: flex;
+ margin: 24px 0; }
+
+#update .loading__element {
+ font: normal 100 2rem/1 Roboto;
+ letter-spacing: .5em; }
+
+#update [class*="el"] {
+ animation: bouncing 3s infinite ease; }
+
+#update .el1 {
+ animation-delay: 0.1s; }
+
+#update .el2 {
+ animation-delay: 0.2s; }
+
+#update .el3 {
+ animation-delay: 0.3s; }
+
+#update .el4 {
+ animation-delay: 0.4s; }
+
+#update .el5 {
+ animation-delay: 0.5s; }
+
+#update .el6 {
+ animation-delay: 0.6s; }
+
+#update .el7 {
+ animation-delay: 0.7s; }
+
+#update .el8 {
+ animation-delay: 0.8s; }
+
+#update .el9 {
+ animation-delay: 0.9s; }
+
+#update .el10 {
+ animation-delay: 1s; }
+
+#update .el11 {
+ animation-delay: 1.1s; }
+
+#update .el12 {
+ animation-delay: 1.2s; }
+
+#update .el13 {
+ animation-delay: 1.3s; }
+
+#update .el14 {
+ animation-delay: 1.4s; }
+
+#update .el15 {
+ animation-delay: 1.5s; }
+
+#update .el16 {
+ animation-delay: 1.6s; }
+
+#update .el17 {
+ animation-delay: 1.7s; }
+
+#update .el18 {
+ animation-delay: 1.8s; }
+
+#update .el19 {
+ animation-delay: 1.9s; }
+
+@keyframes bouncing {
+ 0%, 100% {
+ transform: scale3d(1, 1, 1); }
+ 50% {
+ transform: scale3d(0, 0, 1); } }
+
+#update .current-event {
+ color: rgba(255, 255, 255, 0.53);
+ font: normal 100 1rem/1 Roboto;
+ letter-spacing: .1em; }
+
diff --git a/public/assets/js/bundle.js b/public/assets/js/bundle.js
new file mode 100644
index 0000000..75bdf8d
--- /dev/null
+++ b/public/assets/js/bundle.js
@@ -0,0 +1,428 @@
+/******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId]) {
+/******/ return installedModules[moduleId].exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ i: moduleId,
+/******/ l: false,
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ // Flag the module as loaded
+/******/ module.l = true;
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/******/
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+/******/
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+/******/
+/******/ // define getter function for harmony exports
+/******/ __webpack_require__.d = function(exports, name, getter) {
+/******/ if(!__webpack_require__.o(exports, name)) {
+/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
+/******/ }
+/******/ };
+/******/
+/******/ // define __esModule on exports
+/******/ __webpack_require__.r = function(exports) {
+/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+/******/ }
+/******/ Object.defineProperty(exports, '__esModule', { value: true });
+/******/ };
+/******/
+/******/ // create a fake namespace object
+/******/ // mode & 1: value is a module id, require it
+/******/ // mode & 2: merge all properties of value into the ns
+/******/ // mode & 4: return value when already ns object
+/******/ // mode & 8|1: behave like require
+/******/ __webpack_require__.t = function(value, mode) {
+/******/ if(mode & 1) value = __webpack_require__(value);
+/******/ if(mode & 8) return value;
+/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
+/******/ var ns = Object.create(null);
+/******/ __webpack_require__.r(ns);
+/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
+/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
+/******/ return ns;
+/******/ };
+/******/
+/******/ // getDefaultExport function for compatibility with non-harmony modules
+/******/ __webpack_require__.n = function(module) {
+/******/ var getter = module && module.__esModule ?
+/******/ function getDefault() { return module['default']; } :
+/******/ function getModuleExports() { return module; };
+/******/ __webpack_require__.d(getter, 'a', getter);
+/******/ return getter;
+/******/ };
+/******/
+/******/ // Object.prototype.hasOwnProperty.call
+/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+/******/
+/******/
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(__webpack_require__.s = 0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// General JavaScript
+__webpack_require__ (1)();
+
+// Page-specific JavaScript
+const pageName = document.getElementsByTagName("body")[0].id;
+try {
+ __webpack_require__(3)("./" + pageName)();
+} catch (error) {
+ console.log(
+ "Something went wrong when loading the js for this page...\n" +
+ "The pageName is \"" + pageName + "\".\n" +
+ "If it was excpected to get js for this page, please check the filename, and recompile webpack."
+ );
+}
+
+// Require all styles
+__webpack_require__(8);
+
+
+/***/ }),
+/* 1 */
+/***/ (function(module, exports, __webpack_require__) {
+
+let sidenav = __webpack_require__(2);
+
+module.exports = () => {
+ const pageName = document.getElementsByTagName("body")[0].id;
+ if (pageName == "neo_ide") { return; }
+
+ document.getElementById("sidenav").innerHTML = sidenav;
+
+ M.AutoInit();
+};
+
+
+/***/ }),
+/* 2 */
+/***/ (function(module, exports) {
+
+module.exports = `
+<ul id="slide-out" class="sidenav sidenav-fixed">
+ <li>
+ <div class="user-view">
+ <div class="background">
+ <img src="./logo/150h/Icon.png">
+ </div>
+ <!--<a href="#!user"><img class="circle" src="https://picsum.photos/200/300/?random"></a>
+ <a href="#!name"><span class="white-text name">John Doe</span></a>
+ <a href="#!email"><span class="white-text email">Guest</span></a>-->
+ </div>
+ </li>
+ <li><div class="divider"></div></li>
+ <li><a class="waves-effect" href="/"><i class="material-icons">dashboard</i> Dashboard</a></li>
+ <li><a class="waves-effect" href="/scripts"><i class="material-icons">cloud</i> Scripts</a></li>
+ <li><a class="waves-effect" href="/logviewer"><i class="material-icons">timeline</i> LogViewer</a></li>
+ <li><div class="divider"></div></li>
+ <li><a class="subheader">Settings</a></li>
+ <li><a class="waves-effect" href="strip_setup"><i class="material-icons">straighten</i> Strip setup</a></li>
+ <li><a class="waves-effect" href="/settings"><i class="material-icons">settings</i> Settings</a></li>
+</ul>
+`;
+
+/***/ }),
+/* 3 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var map = {
+ "./": 4,
+ "./general": 1,
+ "./general.js": 1,
+ "./index": 4,
+ "./index.js": 4,
+ "./logviewer": 5,
+ "./logviewer.js": 5,
+ "./neo_ide": 6,
+ "./neo_ide.js": 6,
+ "./scripts": 7,
+ "./scripts.js": 7
+};
+
+
+function webpackContext(req) {
+ var id = webpackContextResolve(req);
+ return __webpack_require__(id);
+}
+function webpackContextResolve(req) {
+ var id = map[req];
+ if(!(id + 1)) { // check for number or string
+ var e = new Error("Cannot find module '" + req + "'");
+ e.code = 'MODULE_NOT_FOUND';
+ throw e;
+ }
+ return id;
+}
+webpackContext.keys = function webpackContextKeys() {
+ return Object.keys(map);
+};
+webpackContext.resolve = webpackContextResolve;
+module.exports = webpackContext;
+webpackContext.id = 3;
+
+/***/ }),
+/* 4 */
+/***/ (function(module, exports) {
+
+let socket = io();
+
+module.exports = () => {
+ M.AutoInit();
+ setupSocket();
+
+ setInterval(() => {
+ socket.emit("GetGeneralInfo");
+ }, 500);
+
+ socket.emit("GetLog", {filter: "success error event", entryN: 10});
+};
+
+function setupSocket() {
+
+ socket.on("lastLogEntries", (entries) => {
+ let list = "";
+ entries.forEach((entry) => {
+ list += "<tr><td>" + prettifyType(entry.type) + "</td><td>" + entry.time + "</td><td>" + entry.details + "</td></tr>";
+ });
+
+ document.getElementById("log-table-body").innerHTML = list;
+ M.AutoInit();
+ });
+
+ socket.on("newLogEntry", (entry) => {
+ // Start with parsing the new entry, no reason to select the DOM-element and stuff, if we are filtering out the entry anyway.
+ let type = entry.type;
+ if ( (type.toUpperCase() !== "SUCCESS") && (type.toUpperCase() !== "ERROR") && (type.toUpperCase() !== "EVENT") && (type.toUpperCase() !== "INFO")) {
+ return;
+ }
+
+ let logTable = document.getElementById("log-table-body");
+
+ let LTable = logTable.rows.length;
+ logTable.deleteRow(LTable - 1); // Since length outputs a 1-based number
+
+ let newEntry = logTable.insertRow(0);
+ newEntry.insertCell(0).innerHTML = prettifyType(entry.type);
+ newEntry.insertCell(1).innerHTML = entry.time;
+ newEntry.insertCell(2).innerHTML = entry.details;
+ M.AutoInit();
+ newEntry.className = "newLogEntry";
+ });
+
+ socket.on("generalInfo", (info) => {
+ if (info["scriptIsExited"]) {
+ document.getElementById("currentScript").innerHTML = info["currentScript"] + " (exited)";
+ } else {
+ document.getElementById("currentScript").innerHTML = info["currentScript"];
+ }
+ document.getElementById("uptime").innerHTML = info["uptime"] + " seconds";
+ });
+
+}
+
+function prettifyType(type) {
+ let prettyTable = {
+ "DEBUG": `<span class="tooltipped" data-position="top" data-tooltip="Debug-log">😸</span>`,
+ "INFO": `<span class="tooltipped" data-position="top" data-tooltip="Just some information">â„šī¸</span>`,
+ "WARNING": `<span class="tooltipped" data-position="top" data-tooltip="A warning">âš ī¸</span>`,
+ "EVENT": `<span class="tooltipped" data-position="top" data-tooltip="Event">âšĄī¸</span>`,
+ "SUCCESS": `<span class="tooltipped" data-position="top" data-tooltip="Something exited successfully">✅</span>`,
+ "ERROR": `<span class="tooltipped" data-position="top" data-tooltip="Error">🔴</span>`,
+ "PYTHON": `<span class="tooltipped" data-position="top" data-tooltip="Output from user-script">🐍</span>`
+ };
+ return prettyTable[type];
+}
+
+
+/***/ }),
+/* 5 */
+/***/ (function(module, exports) {
+
+let socket = io();
+
+module.exports = () => {
+ M.AutoInit();
+
+ socket.emit("GetLog", {filter: "success error event debug python info warning", entryN: 1000});
+ socket.on("lastLogEntries", (entries) => {
+ M.toast({html: "Loading log-files..."});
+ console.log("Log-entries received: " + entries.length);
+ let HTMLBasicTable = "";
+ let HTMLAdvancedTable = "";
+ let HTMLScriptTable = "";
+ let HTMLRAWTable = "";
+
+ entries.forEach((entry) => {
+ let strHTML = "<tr><td>" + prettifyType(entry.type) + "</td><td>" + entry.time + "</td><td>" + entry.details + "</td></tr>";
+
+ if (entry.type === "SUCCESS") { HTMLBasicTable += strHTML; }
+ if (entry.type === "ERROR") { HTMLBasicTable += strHTML; }
+ if (entry.type === "EVENT") { HTMLBasicTable += strHTML; }
+ if (entry.type === "PYTHON") { HTMLScriptTable += strHTML; }
+ if (entry.type !== "PYTHON") { HTMLAdvancedTable += strHTML; }
+
+ //HTMLRAWTable += entry.join(" ");
+ });
+
+ document.getElementById("log-table-basic").innerHTML = HTMLBasicTable;
+ document.getElementById("log-table-script").innerHTML = HTMLScriptTable;
+ document.getElementById("log-table-advanced").innerHTML = HTMLAdvancedTable;
+ //document.getElementById("log-table-raw").innerHTML = HTMLRAWTable;
+
+ });
+
+ socket.on("newLogEntry", (entry) => {
+ if (entry.type === "SUCCESS") { appendEntryToTable("log-table-basic", entry); }
+ if (entry.type === "ERROR") { appendEntryToTable("log-table-basic", entry); }
+ if (entry.type === "EVENT") { appendEntryToTable("log-table-basic", entry); }
+ if (entry.type === "PYTHON") { appendEntryToTable("log-table-script", entry); }
+ if (entry.type !== "PYTHON") { appendEntryToTable("log-table-advanced", entry); }
+ });
+
+};
+
+function appendEntryToTable(tableName, entry) {
+ let newEntry = document.getElementById(tableName).insertRow(0);
+ newEntry.insertCell(0).innerHTML = prettifyType(entry.type);
+ newEntry.insertCell(1).innerHTML = entry.time;
+ newEntry.insertCell(2).innerHTML = entry.details;
+ M.AutoInit();
+ newEntry.className = "newLogEntry";
+}
+
+function prettifyType(type) {
+ let prettyTable = {
+ "DEBUG": `<span class="tooltipped" data-position="top" data-tooltip="Debug-log">😸</span>`,
+ "INFO": `<span class="tooltipped" data-position="top" data-tooltip="Just some information">â„šī¸</span>`,
+ "WARNING": `<span class="tooltipped" data-position="top" data-tooltip="A warning">âš ī¸</span>`,
+ "EVENT": `<span class="tooltipped" data-position="top" data-tooltip="Event">âšĄī¸</span>`,
+ "SUCCESS": `<span class="tooltipped" data-position="top" data-tooltip="Something exited successfully">✅</span>`,
+ "ERROR": `<span class="tooltipped" data-position="top" data-tooltip="Error">🔴</span>`,
+ "PYTHON": `<span class="tooltipped" data-position="top" data-tooltip="Output from user-script">🐍</span>`
+ };
+ return prettyTable[type];
+}
+
+/***/ }),
+/* 6 */
+/***/ (function(module, exports) {
+
+module.exports = () => {
+
+
+};
+
+/***/ }),
+/* 7 */
+/***/ (function(module, exports) {
+
+module.exports = () => {
+ let socket = io();
+ socket.emit("GetScripts", {});
+
+ socket.on("updatedScriptList", (scriptList) => {
+ let localScriptsHTML = "";
+ let remoteScriptsHTML = "";
+
+ for (let i = 0; i < scriptList.length; i++) {
+ if (scriptList[i].loc !== "local") { continue; }
+ let HTMLElem = "<li><div class=\"col s12 m4\"><div class=\"card blue darken-1\"><div class=\"card-content white-text\"><p class=\"card-title\">{{script_name}}</p><p>{{badges}}</p></div><div class=\"card-action white\">{{buttons}}</div></div></div></li>";
+ if (scriptList[i].loc === "local") {
+ HTMLElem = HTMLElem.replace("{{badges}}", "");
+ HTMLElem = HTMLElem.replace("{{script_name}}", scriptList[i].name);
+ HTMLElem = HTMLElem.replace("{{buttons}}",
+ "<a class=\"selectScript\" data-path=" + scriptList[i].path + "><i class=\"material-icons\">play_arrow</i></a>" +
+ "<a class=\"editScript\" data-path=" + scriptList[i].path + "><i class=\"material-icons\">edit</i></a>" +
+ "<a class=\"deleteScript\" data-path=" + scriptList[i].path + "><i class=\"material-icons\">delete_forever</i></a>"
+ );
+ localScriptsHTML += HTMLElem;
+ } else if (scriptList[i].loc === "remote") {
+ HTMLElem = HTMLElem.replace("{{badges}}", "<span class=\"badge yellow darken-1 white-text\">GitHub</span>");
+ HTMLElem = HTMLElem.replace("{{script_name}}", scriptList[i].name);
+ remoteScriptsHTML += HTMLElem;
+ }
+ }
+
+ document.getElementById("local-scripts").innerHTML = localScriptsHTML;
+ document.getElementById("remote-scripts").innerHTML = remoteScriptsHTML;
+
+ });
+
+ /*
+ The delays here with settimeout, is set to a second deliberately, because, rather than making a whole checking-thing.
+ We just wait a second, and assume, that if it worked, the change should show now. Else, check the logViewer.
+ */
+ function clickHandler(event) {
+ let element = event.target.parentElement;
+
+ if (element.className === "selectScript") {
+ M.toast({html: "Now selecting script: " + element.dataset.path});
+ socket.emit("SelectScript", {"scriptPath": element.dataset.path});
+
+ } else if (element.className === "editScript") {
+ window.location.href = (
+ "http://" + window.location.hostname + ":" + window.location.port +
+ "/neo_ide?scriptName=" + btoa(element.dataset.path)
+ );
+
+ } else if (element.className === "deleteScript") {
+ if (confirm("Do you really want to delete this script?\n" + element.dataset.path + "\n\nYou can not undo this action, and the script will be lost forever...")) {
+ M.toast({html: "Trying to create script. If no change after a second. Check the logViewer."});
+ socket.emit("DeleteScript", {"scriptPath": element.dataset.path});
+ setTimeout(() => {socket.emit("GetScripts", {})}, 1000);
+ }
+
+ } else if (element.id === "createEmptyScript") {
+ var scriptName = prompt("Please enter the name of the new script:");
+ if (scriptName != null || scriptName != "") {
+ M.toast({html: "Trying to create script. If no change after a second. Check the logViewer."});
+ socket.emit("CreateEmptyScript", {"scriptName": scriptName});
+ setTimeout(() => {socket.emit("GetScripts", {})}, 1000);
+ }
+
+ }
+
+ }
+
+ addEventListener("click", clickHandler, false);
+
+};
+
+
+/***/ }),
+/* 8 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// extracted by mini-css-extract-plugin
+
+/***/ })
+/******/ ]); \ No newline at end of file
diff --git a/public/assets/logo/0.5x/Icon@0.5x.png b/public/assets/logo/0.5x/Icon@0.5x.png
new file mode 100644
index 0000000..3af8d3f
--- /dev/null
+++ b/public/assets/logo/0.5x/Icon@0.5x.png
Binary files differ
diff --git a/public/assets/logo/150h/Icon.png b/public/assets/logo/150h/Icon.png
new file mode 100644
index 0000000..3fd003b
--- /dev/null
+++ b/public/assets/logo/150h/Icon.png
Binary files differ
diff --git a/public/assets/logo/1x/Icon.png b/public/assets/logo/1x/Icon.png
new file mode 100644
index 0000000..cda811f
--- /dev/null
+++ b/public/assets/logo/1x/Icon.png
Binary files differ