backup
This commit is contained in:
1 parent
04773e50fc
commit
2af216beb0
2 files changed
+18
-19
No files matched your search
@@ -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";
|
|
||||||
@@ -4,16 +4,28 @@ block scripts
|
|||||||
block content
|
block content
|
||||||
h1 p_generator
|
h1 p_generator
|
||||||
p UID:
|
p UID:
|
||||||
input(id="in-id" type="text" name="imdb" placeholder="please input your device id")
|
input(id="in-id" type="text" name="imdb" placeholder="please input your device id")
|
||||||
button(onclick='clickme()') get keys
|
button(onclick='clickme()') get keys
|
||||||
p
|
p
|
||||||
#response
|
table#response
|
||||||
script.
|
script.
|
||||||
function clickme() {
|
function clickme() {
|
||||||
var id = document.getElementById("in-id");
|
var id = document.getElementById("in-id");
|
||||||
console.log(id.value);
|
|
||||||
var keys = getKeys(id.value);
|
var keys = getKeys(id.value);
|
||||||
console.log(keys);
|
|
||||||
var resp = document.getElementById("response");
|
var resp = document.getElementById("response");
|
||||||
resp.innerHTML = JSON.stringify(keys);
|
resp.innerHTML = "";
|
||||||
|
if(keys.hasOwnProperty('User')){
|
||||||
|
var HTML = "<table border=1 width=100%><tr>";
|
||||||
|
HTML += "<td align=left>User</td>";
|
||||||
|
HTML += "<td align=left><b>"+keys.User+"</b></td>";
|
||||||
|
HTML += "</tr><tr>"
|
||||||
|
HTML += "<td align=left>Admin</td>";
|
||||||
|
HTML += "<td align=left><b>"+keys.Admin+"</b></td>";
|
||||||
|
HTML += "</tr></table>";
|
||||||
|
resp.innerHTML = HTML;
|
||||||
|
}else{
|
||||||
|
resp.innerHTML = "invalid input"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user