diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-07-03 17:50:35 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-07-03 17:50:35 +0200 |
| commit | 2418216388eef71e53dff60d36345fbf1c4db684 (patch) | |
| tree | b06bac16c427ac6bc0f6828ce15f6f41c43a4c49 /web/client.html | |
| parent | d05c1f7d4590e3af6eb6ea25be75487a8a706ce0 (diff) | |
| download | WRMS-2418216388eef71e53dff60d36345fbf1c4db684.tar.gz WRMS-2418216388eef71e53dff60d36345fbf1c4db684.zip | |
add admin-password and button to become admin from the client
Diffstat (limited to 'web/client.html')
| -rw-r--r-- | web/client.html | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/web/client.html b/web/client.html index c193a42..63c9c4d 100644 --- a/web/client.html +++ b/web/client.html @@ -345,6 +345,14 @@ document.getElementById("nextbutton").addEventListener("click", function() { new HttpClient().get("/next", console.log); }); + {{else}} + document.getElementById("becomeAdmin").addEventListener("click", function() { + let pw = prompt("Enter admin password", ""); + new HttpClient().post("/admin", pw, () => { + location.reload(); + return false; + }); + }); {{end}} } </script> @@ -384,6 +392,10 @@ </div> {{end}} + {{if not .IsAdmin}} + <div style='float: right;'><button id="becomeAdmin">Become Admin</button></div> + {{end}} + <h2>Playlist</h2> <ul id='playlist'></ul> </body> |
