aboutsummaryrefslogtreecommitdiff
path: root/web/client.html
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-07-03 17:50:35 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2023-07-03 17:50:35 +0200
commit2418216388eef71e53dff60d36345fbf1c4db684 (patch)
treeb06bac16c427ac6bc0f6828ce15f6f41c43a4c49 /web/client.html
parentd05c1f7d4590e3af6eb6ea25be75487a8a706ce0 (diff)
downloadWRMS-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.html12
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>