Serge Bazanski | de0330a | 2020-07-30 20:48:48 +0200 | [diff] [blame] | 1 | <!doctype html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta charset="utf-8"> |
| 5 | <title>laserproxy</title> |
| 6 | </head> |
| 7 | <body> |
| 8 | <h1>warsaw hackerspace SOKÓŁ proxy</h1> |
| 9 | {{ if eq .CurrentAddress "" }} |
| 10 | <p> |
| 11 | Currently <b>not</b> in use by anyone. Wanna lase something? |
| 12 | </p> |
| 13 | <form action="/take" method="POST"> |
| 14 | I am <input id="persist" type="text" name="who" placeholder="{{ .SampleName }}" /> and want to <input type="submit" value="use the laser" /> over the network. |
| 15 | </form> |
| 16 | {{ else if .You }} |
| 17 | <p> |
| 18 | Currently in use by <b>you</b> ({{ .CurrentNote }}, {{ .CurrentAddress }}). <b>Expires in {{ .CurrentDeadline }}.</b> This deadline will automatically extend as long as the laser is actively used. |
| 19 | </p> |
| 20 | <p> |
| 21 | To cut something, use LightBurn, and point it as <b>10.8.1.2</b> (as a 'Ruida' Ethernet/LAN controller). |
| 22 | </p> |
| 23 | <form action="/release" method="POST"> |
| 24 | <input type="submit" value="I'm done with the laser." /> |
| 25 | </form> |
| 26 | {{ else }} |
| 27 | <p> |
| 28 | Currently in use by '{{ .CurrentNote }}' ({{ .CurrentAddress }}). <b>Expires in {{ .CurrentDeadline }}</b>. |
| 29 | </p> |
| 30 | <form action="/force" method="POST"> |
| 31 | I need to use the laser now and I can't ask the current user ({{ .CurrentNote }}) to release the lock. <input type="submit" value="I want to forcefully release the lock" />, and am aware of the possible consequences of that. |
| 32 | </form> |
| 33 | {{ end }} |
| 34 | <p> |
| 35 | <b>Confused by this?</b> See our <a href="https://wiki.hackerspace.pl/infra:tools:lasercutter">wiki entry about how to use the laser</a>. |
| 36 | </p> |
| 37 | |
| 38 | <script> |
| 39 | let element = document.querySelector("#persist"); |
| 40 | if (element !== null) { |
| 41 | let existing = localStorage.getItem("hacker"); |
| 42 | if (existing !== "" && existing !== null) { |
| 43 | element.value = existing; |
| 44 | } |
| 45 | element.addEventListener('change', (event) => { |
| 46 | let value = event.target.value; |
| 47 | localStorage.setItem("hacker", value); |
| 48 | }); |
| 49 | } |
| 50 | </script> |
| 51 | </body> |
| 52 | </html> |