From 2418216388eef71e53dff60d36345fbf1c4db684 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 3 Jul 2023 17:50:35 +0200 Subject: add admin-password and button to become admin from the client --- web/client.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'web') 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}} } @@ -384,6 +392,10 @@ {{end}} + {{if not .IsAdmin}} +
+ {{end}} +

Playlist

-- cgit v1.2.3