blob: c9fab16adffff9ee00087f13fd40240bae648449 [file] [log] [blame]
Serge Bazanskide0330a2020-07-30 20:48:48 +02001<!doctype html>
2<html lang="en">
3 <head>
4 <meta charset="utf-8">
radex81da4e52020-08-27 23:56:29 +02005 <title>HSWAW Lasercutter</title>
Serge Bazanskide0330a2020-07-30 20:48:48 +02006 </head>
7 <body>
radex81da4e52020-08-27 23:56:29 +02008 <h1>Warsaw Hackerspace Sokół Lasercutter Proxy</h1>
Serge Bazanskide0330a2020-07-30 20:48:48 +02009 {{ 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>
radex81da4e52020-08-27 23:56:29 +020018 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 Bazanskide0330a2020-07-30 20:48:48 +020019 </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>
radex81da4e52020-08-27 23:56:29 +020028 Currently in use by '{{ .CurrentName }}' ({{ .CurrentAddress }}). <b>Expires automatically in {{ .CurrentDeadline }}</b>.
Serge Bazanskide0330a2020-07-30 20:48:48 +020029 </p>
30 <form action="/force" method="POST">
radex81da4e52020-08-27 23:56:29 +020031 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 Bazanskide0330a2020-07-30 20:48:48 +020032 </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>
radex81da4e52020-08-27 23:56:29 +020037 <p><small><a href="https://cs.hackerspace.pl/hscloud/-/tree/hswaw/laserproxy">source code</a></small></p>
Serge Bazanskide0330a2020-07-30 20:48:48 +020038
39 <script>
40let element = document.querySelector("#persist");
41if (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>