diff --git a/Client/scripts.js b/Client/scripts.js index 02ac217..46d1a54 100644 --- a/Client/scripts.js +++ b/Client/scripts.js @@ -347,7 +347,7 @@ async function submitPerms(e) { tempData["PM"] = document.getElementById("partymodesettingcheckbox").checked; tempData["VOL"] = document.getElementById("partymodesettingcheckbox").checked; let returncode = await getFromServer({"setting":"perms","admin":tempData},"settings"); - if (returncode == ERR_NO_ADMIN) { + if (returncode == ERR_NO_ADMIN || returncode == null) { // if you aren't allowed to check the box then toggle it again // its not perfect if you spam click, but it gets the point across to the user let clickedBox = e.srcElement; diff --git a/readme.md b/readme.md index e63bcbd..0fa7206 100644 --- a/readme.md +++ b/readme.md @@ -28,6 +28,7 @@ webbyBits.py * *If getting images, this process may take a long time with a large amount of mp3 files* 4. Run `webbyBits.py` * *The port can be customized at runtime using* `-p portNumber` *as an atribute* + * *You can add an admin password at runtime with* `-a AdminPass` *as an atribute* You can now connect with the client and use the app as normal. \ *Make sure you have turned down/off any other apps that might make noise or notification sounds* \ @@ -57,6 +58,15 @@ These are specific details on each section of the app, and how to use them - Uses port 19054 by default - `--port (port)` changes the port for that run - The default port can be changed in the file + - Running with `--admin (admin password)` sets an admin password for moderation on the client + - Anyone who knows the admin password can enter it on the client and change the abilities of any non-admin users (for example to limit skipping) + - The total set of features that can be restricted is + - Skip track + - Play-pause toggle + - Add track + - Partymode toggle + - Change volume + - When this argument is left out (or empty string) the admin features aren't used, and everyone can do everything ### Client: ![image](./Screenshot_MAIN.png) \