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"> |
radex | 81da4e5 | 2020-08-27 23:56:29 +0200 | [diff] [blame] | 5 | <title>HSWAW Lasercutter</title> |
Serge Bazanski | de0330a | 2020-07-30 20:48:48 +0200 | [diff] [blame] | 6 | </head> |
| 7 | <body> |
radex | 81da4e5 | 2020-08-27 23:56:29 +0200 | [diff] [blame] | 8 | <h1>Warsaw Hackerspace Sokół Lasercutter Proxy</h1> |
Serge Bazanski | de0330a | 2020-07-30 20:48:48 +0200 | [diff] [blame] | 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> |
radex | 81da4e5 | 2020-08-27 23:56:29 +0200 | [diff] [blame] | 18 | Currently in use by <b>you</b> ({{ .CurrentName }}, {{ .CurrentAddress }}). <b>Expires in {{ .CurrentDeadline }}.</b> This deadline will automatically extend as long as the laser is actively used. |
Serge Bazanski | de0330a | 2020-07-30 20:48:48 +0200 | [diff] [blame] | 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> |
radex | 81da4e5 | 2020-08-27 23:56:29 +0200 | [diff] [blame] | 28 | Currently in use by '{{ .CurrentName }}' ({{ .CurrentAddress }}). <b>Expires automatically in {{ .CurrentDeadline }}</b>. |
Serge Bazanski | de0330a | 2020-07-30 20:48:48 +0200 | [diff] [blame] | 29 | </p> |
| 30 | <form action="/force" method="POST"> |
radex | 81da4e5 | 2020-08-27 23:56:29 +0200 | [diff] [blame] | 31 | I want to use the laser now, and I'm sure {{ .CurrentName }} is not using it. <input type="submit" value="I want to forcefully release the lock" />, and am aware that doing this will bring wrath onto me if someone <em>is</em> using the laser. |
Serge Bazanski | de0330a | 2020-07-30 20:48:48 +0200 | [diff] [blame] | 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> |
radex | 81da4e5 | 2020-08-27 23:56:29 +0200 | [diff] [blame] | 37 | <p><small><a href="https://cs.hackerspace.pl/hscloud/-/tree/hswaw/laserproxy">source code</a></small></p> |
Serge Bazanski | de0330a | 2020-07-30 20:48:48 +0200 | [diff] [blame] | 38 | |
| 39 | <script> |
| 40 | let element = document.querySelector("#persist"); |
| 41 | if (element !== null) { |
| 42 | let existing = localStorage.getItem("hacker"); |
| 43 | if (existing !== "" && existing !== null) { |
| 44 | element.value = existing; |
| 45 | } |
| 46 | element.addEventListener('change', (event) => { |
| 47 | let value = event.target.value; |
| 48 | localStorage.setItem("hacker", value); |
| 49 | }); |
| 50 | } |
| 51 | </script> |
| 52 | </body> |
| 53 | </html> |