diff options
| author | Pinapelz <yukais@pinapelz.com> | 2026-07-02 22:17:17 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2026-07-02 22:17:17 -0700 |
| commit | 04eb44d685ba677a444b73c7cfc2427d2740497f (patch) | |
| tree | 94b35f31d59b2268e40a054304191be38848a7f6 /src/client/Buttons.hx | |
| parent | ece9cf2749ac592299a34a2cf0f24672eedbd19e (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.hx | 6 |
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); |
