aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/Buttons.hx
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2022-03-15 06:51:53 +0300
committerRblSb <msrblsb@gmail.com>2022-03-15 06:51:53 +0300
commit79f3c34d24d6ae6aba17dd643726e20754140d80 (patch)
treed6b1d23bcfbdc023fc757f25b1b3fa085fd5e790 /src/client/Buttons.hx
parent692e4690abc2083d151c011a2df2976ecf6886cc (diff)
Update locked playlist restrictions
And add "toggleItemType" permission. Closes #36
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