aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/Buttons.hx
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2026-07-02 22:17:17 -0700
committerPinapelz <yukais@pinapelz.com>2026-07-02 22:17:17 -0700
commit04eb44d685ba677a444b73c7cfc2427d2740497f (patch)
tree94b35f31d59b2268e40a054304191be38848a7f6 /src/client/Buttons.hx
parentece9cf2749ac592299a34a2cf0f24672eedbd19e (diff)
implement better leader, queue, and upload management
- Majority vote skip management (Admins and the original video queuer overrides this behavior) - Leader request now requires the current leader to give up the role (via `/giveup <new-leader>`) - Overhauled default CSS and improved mobile view - Caching and uploading files is limited to Admin users only Signed-off-by: Pinapelz <yukais@pinapelz.com>
Diffstat (limited to 'src/client/Buttons.hx')
-rw-r--r--src/client/Buttons.hx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/Buttons.hx b/src/client/Buttons.hx
index 56f28d5..f3a2474 100644
--- a/src/client/Buttons.hx
+++ b/src/client/Buttons.hx
@@ -228,7 +228,7 @@ class Buttons {
getEl("#voiceoverblock").style.display = (url.length > 0 && isSingle) ? "" : "none";
final isExternal = main.isExternalVideoUrl(url);
- final showCache = isSingle && isExternal
+ final showCache = main.isAdmin() && isSingle && isExternal
&& main.playersCacheSupport.contains(playerType);
checkboxCache.parentElement.style.display = showCache ? "" : "none";
checkboxCache.checked = settings.checkedCache.contains(playerType);
@@ -258,6 +258,10 @@ class Buttons {
}
getEl("#mediaurl-upload").onclick = e -> {
+ if (!main.isAdmin()) {
+ main.serverMessage("Only admins may upload files.", true, false);
+ return;
+ }
Utils.browseJsFile(file -> {
final uploader = new FileUploader(main);
uploader.uploadFile(file);
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage