From 983c7747cc3ed7424ce93863b9d01ef55cb665c1 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Fri, 31 Jan 2020 01:03:06 +0100 Subject: [PATCH] Create dummy logger UI --- src/csui/LoggerUi.vue | 90 +++++++++++++++++++++++++++++++++++++++++++ src/ext/uw.js | 26 +++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 src/csui/LoggerUi.vue diff --git a/src/csui/LoggerUi.vue b/src/csui/LoggerUi.vue new file mode 100644 index 0000000..28bbbed --- /dev/null +++ b/src/csui/LoggerUi.vue @@ -0,0 +1,90 @@ + + + + + diff --git a/src/ext/uw.js b/src/ext/uw.js index bc476c3..f8f628d 100644 --- a/src/ext/uw.js +++ b/src/ext/uw.js @@ -7,6 +7,9 @@ import CommsClient from './lib/comms/CommsClient'; import PageInfo from './lib/video-data/PageInfo'; import Logger from './lib/Logger'; +import Vue from 'vue'; +import LoggerUi from '../csui/LoggerUi'; + if(Debug.debug){ console.log("\n\n\n\n\n\n ——— Sᴛλʀᴛɪɴɢ Uʟᴛʀᴀᴡɪᴅɪꜰʏ ———\n << ʟᴏᴀᴅɪɴɢ ᴍᴀɪɴ ꜰɪʟᴇ >>\n\n\n\n"); try { @@ -35,6 +38,7 @@ class UW { } async init(){ + this.createUi(); if (Debug.debug) { console.log("[uw::main] loading configuration ..."); } @@ -136,6 +140,28 @@ class UW { } + + createUi() { + console.log("CREATING UI"); + const random = Math.round(Math.random() * 69420); + const uwid = `uw-ui-root-${random}`; + + const rootDiv = document.createElement('div'); + rootDiv.setAttribute("style", "position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 999999; background-color: #ff0000;"); + rootDiv.setAttribute("id", uwid); + + document.body.appendChild(rootDiv); + + new Vue({ + el: `#${uwid}`, + components: { + LoggerUi + }, + render(h) { + return h('logger-ui'); + } + }) + } } var main = new UW();