aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/Buttons.hx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/Buttons.hx')
-rw-r--r--src/client/Buttons.hx8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client/Buttons.hx b/src/client/Buttons.hx
index 902da1b..aa7e1cc 100644
--- a/src/client/Buttons.hx
+++ b/src/client/Buttons.hx
@@ -144,7 +144,13 @@ class Buttons {
final lockPlaylist = ge("#lockplaylist");
lockPlaylist.onclick = e -> {
- if (main.isAdmin()) main.send({type: TogglePlaylistLock});
+ if (!main.hasPermission(LockPlaylistPerm)) return;
+ if (main.isPlaylistOpen) {
+ if (!window.confirm(Lang.get("lockPlaylistConfirm"))) return;
+ }
+ main.send({
+ type: TogglePlaylistLock
+ });
}
final showMediaUrl = ge("#showmediaurl");
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage