index.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  5. <title>OliveTin</title>
  6. <link rel = "stylesheet" type = "text/css" href = "style.css" />
  7. <link rel = "shortcut icon" type = "image/png" href = "OliveTinLogo.png" />
  8. </head>
  9. <body>
  10. <main title = "main content">
  11. <fieldset id = "switcher">
  12. <button id = "showActions">Actions</button>
  13. <button id = "showLogs">Logs</button>
  14. </fieldset>
  15. <section id = "contentLogs" title = "Logs" hidden>
  16. <table>
  17. <thead>
  18. <tr>
  19. <th>Timestamp</th>
  20. <th>Log</th>
  21. <th>Exit Code</th>
  22. </tr>
  23. </thead>
  24. <tbody id = "logTableBody" />
  25. </table>
  26. </section>
  27. <section id = "contentActions" title = "Actions" hidden >
  28. <fieldset id = "rootGroup">
  29. </fieldset>
  30. </section>
  31. <noscript>
  32. <div class = "error">Sorry, JavaScript is required to use OliveTin.</div>
  33. </noscript>
  34. </main>
  35. <footer title = "footer">
  36. <p><img title = "application icon" src = "OliveTinLogo.png" height = "1em" class = "logo" /> OliveTin</p>
  37. <p>
  38. <a href = "https://docs.olivetin.app" target = "_new">Documentation</a> |
  39. <a href = "https://github.com/OliveTin/OliveTin/issues/new/choose" target = "_new">Raise an issue on GitHub</a> |
  40. <span id = "currentVersion">Version: ?</p>
  41. <a id = "availableVersion" href = "http://olivetin.app" target = "_blank" hidden>?</a>
  42. </p>
  43. </footer>
  44. <template id = "tplArgumentForm">
  45. <form>
  46. <div class = "wrapper">
  47. <div>
  48. <span class = "icon" role = "icon"></span>
  49. <h2>Argument form</h2>
  50. </div>
  51. <div class = "arguments"></div>
  52. <div class = "buttons">
  53. <input name = "start" type = "submit" value = "Start">
  54. <button name = "cancel">Cancel</button>
  55. </div>
  56. </div>
  57. <form>
  58. </template>
  59. <template id = "tplActionButton">
  60. <button>
  61. <span role = "img" title = "button icon" class = "icon">&#x1f4a9;</span>
  62. <p role = "title" class = "title">Untitled Button</p>
  63. </button>
  64. </template>
  65. <template id = "tplLogRow">
  66. <tr class = "logRow">
  67. <td class = "timestamp">?</td>
  68. <td>
  69. <span class = "icon" role = "icon"></span>
  70. <span class = "content">?</span>
  71. <details>
  72. <summary>stdout</summary>
  73. <pre class = "stdout">
  74. ?
  75. </pre>
  76. </details>
  77. <details>
  78. <summary>stderr</summary>
  79. <pre class = "stderr">
  80. ?
  81. </pre>
  82. </details>
  83. </td>
  84. <td class = "exitCode">?</td>
  85. </tr>
  86. </template>
  87. <script type = "text/javascript">
  88. /**
  89. This is the bootstrap code, which relies on very simple, old javascript
  90. to at least display a helpful error message if we can't use OliveTin.
  91. */
  92. function showBigError (type, friendlyType, message) {
  93. clearInterval(window.buttonInterval)
  94. console.error('Error ' + type + ': ', message)
  95. const domErr = document.createElement('div')
  96. domErr.classList.add('error')
  97. domErr.innerHTML = '<h1>Error ' + friendlyType + '</h1><p>' + message + "</p><p><a href = 'http://docs.olivetin.app/troubleshooting.html' target = 'blank'/>OliveTin Documentation</a></p>"
  98. document.getElementById('rootGroup').appendChild(domErr)
  99. }
  100. </script>
  101. <script type = "text/javascript" nomodule>
  102. showBigError("js-modules-not-supported", "Sorry, your browser does not support JavaScript modules.", null)
  103. </script>
  104. <script type = "module" src = "main.js"></script>
  105. </body>
  106. </html>