From ea6546d1ba636a249e0fc53cee47541025c126d3 Mon Sep 17 00:00:00 2001 From: amy Date: Wed, 1 Feb 2023 14:15:04 -0600 Subject: almost done with win api --- display.html | 190 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tty.html | 54 ++++++++++------- 2 files changed, 224 insertions(+), 20 deletions(-) create mode 100644 display.html diff --git a/display.html b/display.html new file mode 100644 index 0000000..2bb7e03 --- /dev/null +++ b/display.html @@ -0,0 +1,190 @@ + + + + + + + + +
+ + + \ No newline at end of file diff --git a/tty.html b/tty.html index 65e7533..859d3a8 100644 --- a/tty.html +++ b/tty.html @@ -56,9 +56,10 @@ let working_dir = "/" let fs = [ { name: ".bashrc", perms: { r: true }, dir: false, content: "neofetch" }, - { name: "readme", perms: { r: true }, dir: false, content: "test test acr" } - , { name: "help", perms: { r: true }, dir: true, content: [{ name: "aaa", perms: { r: true }, dir: false, content: "test test test" }] } - , { name: ".secret", perms: { r: true }, dir: true, content: [] } + { name: "readme", perms: { r: true }, dir: false, content: "i dont really know what to put here:(" } + , { name: "more-aboutme", perms: { r: true }, dir: false, content: "experienced development in ts/js and c/c++\nless experience but still some in\nclojure, java, python, and probably some more.\n\ni like manga and anime, favorites are something like\n(not ordered) mushoku tensei, pet girl of sakurasou\noverlord, rising of shield here\nand that time i got reincarnated as a slime.\n\ni also play some games n stuff,\nlove terraria, and some other similar games\ni also lovelove visual novels\nusually romance/horror ones" } + , { name: "test", perms: { r: true }, dir: true, content: [{ name: "aaa", perms: { r: true }, dir: false, content: "test test test" }] } + , { name: ".secret", perms: { r: true }, dir: true, content: [{ name: "readme", perms: { r: true }, dir: false, content: "still working on things:) nothing here is final\n or even close" }] } ] function set_wd(dir) { @@ -104,8 +105,18 @@ return "/" + path.join("/") } function main() { - document.getElementById("line").value = "neofetch" - ex() + for (let d of fs) { + if (d.name == '.bashrc') { + for (let line of d.content.split("\n")) { + document.getElementById("line").value = line + ex() + } + break + } + } + setInterval(() => { + document.getElementById("line").focus() + }, 10) } function ex() { let temp_working_dir = working_dir @@ -113,8 +124,12 @@ let com = document.getElementById("line").value; let stripped = com.split(" ") switch (stripped[0]) { + case 'jssh': + main() + break; case 'neofetch': - document.getElementById("history").innerHTML += "
\
+                    let add = ''
+                    add += "
\
   ,-.       _,---._ __   / \\ \n \
  /  )    .-'       `./ /   \\ \n \
 (  (   ,'            `/    /| \n \
@@ -126,29 +141,28 @@
   |  | (   |            | / \n \
   )  |  \\  `.___________|/ \n \
   `--'   `--' 
" //position this plz:) - document.getElementById("history").innerHTML += "hello, i am amelia, they/them
i am mostly a typescript and c++ dev, but
i can work in most languages
--
i enjoy manga, and coding in free time
contact me at ameliasquires@disroot.org

" - colors = ['#cdb4db','#ffc8dd','#ffafcc','#bde0fe','#a2d2ff'] - for(let co of colors){ - document.getElementById("history").innerHTML += "
"
+                    add += "
hello, i am amelia, they/them
i am mostly a typescript and c++ dev, but
i can work in most languages
--
i enjoy manga, and coding in free time
contact me at ameliasquires@disroot.org

" + colors = ['#cdb4db', '#ffc8dd', '#ffafcc', '#bde0fe', '#a2d2ff'] + for (let co of colors) { + add += "
"
                     }
-                    document.getElementById("history").innerHTML += "
" - colors = ['#a81d61','#ff218e','#fcd800','#0194fc','#007cd5'] - for(let co of colors){ - document.getElementById("history").innerHTML += "
"
+                    add += "
" + colors = ['#a81d61', '#ff218e', '#fcd800', '#0194fc', '#007cd5'] + for (let co of colors) { + add += "
"
                     }
-                    
-                    document.getElementById("history").innerHTML +="

" + add += "


" + document.getElementById("history").innerHTML += add break; case 'clear': document.getElementById("history").innerHTML = ''; break; case 'echo': - let l = stripped.splice(1, 1) - document.getElementById("history").innerHTML += l + "
"; + document.getElementById("history").innerHTML += com.substr(4) + "
"; break; case 'help': - document.getElementById("history").innerHTML += "jssh -- version 1.0.0 (dev)

commands: neofetch, help,
cat [path],pwd,
ls [path] [-a], cd [path],
clear, echo [str]
" + document.getElementById("history").innerHTML += "jssh -- version 1.0.0 (dev)

commands: neofetch, help,
cat [path],pwd,
ls [path] [-a], cd [path],
clear, echo [str],jssh
" break; case 'cat': @@ -247,7 +261,7 @@
- λ + λ
-- cgit v1.2.3