From 2af216beb0cd0047cb428cc0dff7fee1ed1b00b0 Mon Sep 17 00:00:00 2001 From: Selcuk Sari Date: Fri, 1 Jul 2022 19:09:41 +0300 Subject: [PATCH] backup --- Rev1/node/public/js/ss.js | 13 ------------- Rev1/node/views/p_generator.pug | 24 ++++++++++++++++++------ 2 files changed, 18 insertions(+), 19 deletions(-) delete mode 100644 Rev1/node/public/js/ss.js diff --git a/Rev1/node/public/js/ss.js b/Rev1/node/public/js/ss.js deleted file mode 100644 index a078c9f..0000000 --- a/Rev1/node/public/js/ss.js +++ /dev/null @@ -1,13 +0,0 @@ -// import { Terminal } from "xterm"; - -// import { Terminal } from "xterm"; - -const terminal = document.getElementById("terminal"); -console.log("hi"); - -// const term = Terminal({ cols: 120, rows: 40 }); -// const term = new Terminal(); -// term.open(terminalDiv); -// term.write("first succesfull hello world"); - -terminal.innerHTML = "Terminal should be here"; diff --git a/Rev1/node/views/p_generator.pug b/Rev1/node/views/p_generator.pug index 2d9de44..3cce6cd 100644 --- a/Rev1/node/views/p_generator.pug +++ b/Rev1/node/views/p_generator.pug @@ -4,16 +4,28 @@ block scripts block content h1 p_generator p UID: - input(id="in-id" type="text" name="imdb" placeholder="please input your device id") - button(onclick='clickme()') get keys + input(id="in-id" type="text" name="imdb" placeholder="please input your device id") + button(onclick='clickme()') get keys p - #response + table#response script. function clickme() { var id = document.getElementById("in-id"); - console.log(id.value); var keys = getKeys(id.value); - console.log(keys); var resp = document.getElementById("response"); - resp.innerHTML = JSON.stringify(keys); + resp.innerHTML = ""; + if(keys.hasOwnProperty('User')){ + var HTML = ""; + HTML += ""; + HTML += ""; + HTML += "" + HTML += ""; + HTML += ""; + HTML += "
User"+keys.User+"
Admin"+keys.Admin+"
"; + resp.innerHTML = HTML; + }else{ + resp.innerHTML = "invalid input" + } + + } \ No newline at end of file