aboutsummaryrefslogtreecommitdiff
path: root/html/index.html
diff options
context:
space:
mode:
authorgrant-kun <[email protected]>2022-10-04 09:00:27 -0500
committergrant-kun <[email protected]>2022-10-04 09:00:27 -0500
commit5b6bdefbec79245a93d38ea423738322580e73b7 (patch)
treecd28049ef4670b8fdd4bbaed36db2e9b5a972f04 /html/index.html
parentcb88571c538e54a363ee2489df2eff23283174d0 (diff)
kanna
Diffstat (limited to 'html/index.html')
-rw-r--r--html/index.html18
1 files changed, 16 insertions, 2 deletions
diff --git a/html/index.html b/html/index.html
index 0fb27f9..4dcc8de 100644
--- a/html/index.html
+++ b/html/index.html
@@ -13,6 +13,12 @@
position: relative
}
+ @media only screen and (max-width: 760px) {
+ .pan {
+ display: none;
+ }
+ }
+
abbr:hover::after {
background: #add8e6;
border-radius: 4px;
@@ -103,6 +109,7 @@
let user = document.getElementById('user').value
let pass = document.getElementById('pass').value
let out = {}
+
Object.assign(out, { json: true, enc: true, sid: sid }, { data: nodersa(pub, 'pkcs8-public').encrypt({ user: user, pass: pass, date: new Date() }, 'base64') })
xhr.send(JSON.stringify(out))
@@ -139,8 +146,13 @@
submit()
}
};
+ let mypriv, mypub
async function load() {
- sendnoenc('pub.key', { sid: sid })
+ let kekw = await nodersa({ b: 512 })
+ mypriv = await kekw.exportKey('pkcs1-private')
+ mypub = await kekw.exportKey('pkcs8-public')
+ console.log(mypub)
+ sendnoenc('pub.key', { sid: sid, pub: mypub })
readTextFile("kanna.txt").then((kanna) => {
let left = -300;
let top = -40;
@@ -155,7 +167,9 @@
document.body.innerHTML += "<div style='position:absolute;bottom:20px;right:50px;user-select: none;cursor:pointer;' onclick=\"location.href='mailto:[email protected]';\"><tt>need a account? contact [email protected]<sub><sub>(click here)</sub></sub></tt></div>"
*/
deg = 10
- document.body.innerHTML += "<div id='pan' style='position:absolute;bottom:0px;right:0px;width:600px;height:100px;background-color:rgba(150,150,150,0.3);box-shadow: 0px 0px 20px 12px rgba(0,0,0,0.5);backdrop-filter:hue-rotate(10deg) blur(5px);border-radius:10px 0px 0px 0px;'></div>"
+ document.body.innerHTML += "<div id='pan' style='display: flex;flex-direction: column;position:absolute;bottom:0px;right:0px;width:45%;height:100px;background-color:rgba(150,150,150,0.3);box-shadow: 0px 0px 20px 12px rgba(0,0,0,0.1);backdrop-filter:hue-rotate(10deg) blur(5px);border-radius:10px 0px 0px 0px;'>\
+ <div style='padding:30px;padding-bottom:40px;'>user:<input style='padding:5px;' placeholder='root' type='text' id='user' name='user'>pass:<input style='padding:5px;' type='password' id='pass' name='pass'> <input style='background-color:rgba(200,200,200,.3);border-color:rgba(80,80,80,.1);border:line;border-radius:4px;padding:5px;' type='button' value='submit' onclick='submit()'></div>"
+ document.body.innerHTML += "</div>"
setInterval(() => {
deg += 10