diff --git a/html/system.html b/html/system.html index 9c07fdc1..f538d3ee 100644 --- a/html/system.html +++ b/html/system.html @@ -88,6 +88,8 @@


Be careful when entering console commands, you can lock yourself out!
+
+

 
     
 
diff --git a/html/system.js b/html/system.js
index f9fd37eb..0160b8b2 100644
--- a/html/system.js
+++ b/html/system.js
@@ -35,14 +35,19 @@ async function ipSub() {
 }
 
 async function cmdSub() {
-  var cmd = document.getElementById('console_cmd').value;
+  const input = document.getElementById('console_cmd');
+  const out = document.getElementById('console_out');
+  const cmd = input.value;
   try {
     const response = await fetch('/cmd', {
       method: 'POST',
       body: cmd
     });
-    console.log('Completed!', response);
+    out.textContent += "> " + cmd + "\n" + await response.text();
+    out.scrollTop = out.scrollHeight;
+    input.value = "";
   } catch(err) {
+      out.textContent += "> " + cmd + "\n" + err + "\n";
       console.error(`Error: ${err}`);
   }
 }