index.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <!DOCTYPE html>
  2. <html lang = "en">
  3. <head>
  4. <meta charset = "UTF-8" />
  5. <meta name = "viewport" content = "width=device-width, initial-scale=1.0" />
  6. <meta name = "description" content = "Give safe and simple access to predefined shell commands from a web interface." />
  7. <title>OliveTin</title>
  8. <link rel = "stylesheet" type = "text/css" href = "/theme.css" />
  9. <link rel = "stylesheet" href = "node_modules/@xterm/xterm/css/xterm.css" />
  10. <link rel = "shortcut icon" type = "image/png" href = "OliveTinLogo.png" />
  11. <link rel = "apple-touch-icon" sizes="57x57" href="OliveTinLogo-57px.png" />
  12. <link rel = "apple-touch-icon" sizes="120x120" href="OliveTinLogo-120px.png" />
  13. <link rel = "apple-touch-icon" sizes="180x180" href="OliveTinLogo-180px.png" />
  14. <base href = "/" />
  15. </head>
  16. <body>
  17. <slot id = "app" />
  18. <noscript>
  19. <div class = "error">Sorry, JavaScript is required to use OliveTin.</div>
  20. </noscript>
  21. <dialog title = "Big Error Message" id = "big-error" class = "error padded-content">
  22. </dialog>
  23. <script type = "text/javascript">
  24. const bigErrorDialog = document.getElementById('big-error')
  25. /**
  26. This is the bootstrap code, which relies on very simple, old javascript
  27. to at least display a helpful error message if we can't use OliveTin.
  28. */
  29. window.showBigError = function (type, friendlyType, message, isFatal) {
  30. console.error('Error ' + type + ': ', message)
  31. return;
  32. bigErrorDialog.innerHTML = '<h1>Error ' + friendlyType + '</h1><p>' + message + "</p><p><a href = 'http://docs.olivetin.app/troubleshooting/err-" + type + ".html' target = 'blank'/>" + type + " error in OliveTin Documentation</a></p>"
  33. if (isFatal) {
  34. bigErrorDialog.innerHTML += '<p>You will need to refresh your browser to clear this message.</p>'
  35. } else {
  36. bigErrorDialog.innerHTML += '<p>This error message will go away automatically if the problem is solved.</p>'
  37. }
  38. bigErrorDialog.showModal()
  39. console.error('Error ' + type + ': ', message)
  40. }
  41. window.clearBigErrors = function () {
  42. bigErrorDialog.close()
  43. }
  44. </script>
  45. <script type = "text/javascript" nomodule>
  46. showBigError("js-modules-not-supported", "Sorry, your browser does not support JavaScript modules.", null)
  47. </script>
  48. <script type = "module" src = "main.js"></script>
  49. </body>
  50. </html>