mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added settings for disabling chat in a channel
This commit is contained in:
@@ -22,7 +22,7 @@ var Admin = {
|
||||
}
|
||||
Helper.removeClass(".delete-context-menu", "context-menu-disabled");
|
||||
names = ["vote","addsongs","longsongs","frontpage", "allvideos",
|
||||
"removeplay", "skip", "shuffle", "userpass"];
|
||||
"removeplay", "skip", "shuffle", "userpass", "toggleChat"];
|
||||
//Crypt.set_pass(chan.toLowerCase(), Crypt.tmp_pass);
|
||||
|
||||
for (var i = 0; i < names.length; i++) {
|
||||
@@ -105,7 +105,7 @@ var Admin = {
|
||||
w_p = true;
|
||||
adminpass = "";
|
||||
names = ["vote","addsongs","longsongs","frontpage", "allvideos",
|
||||
"removeplay", "skip", "shuffle"];
|
||||
"removeplay", "skip", "shuffle", "toggleChat"];
|
||||
document.getElementById("password").value = "";
|
||||
Helper.css("#thumbnail_form", "display", "none");
|
||||
Helper.css("#description_form", "display", "none");
|
||||
@@ -146,9 +146,9 @@ var Admin = {
|
||||
music = conf_array.allvideos;
|
||||
longsongs = conf_array.longsongs;
|
||||
names = ["vote","addsongs","longsongs","frontpage", "allvideos",
|
||||
"removeplay", "skip", "shuffle", "userpass"];
|
||||
|
||||
|
||||
"removeplay", "skip", "shuffle", "userpass", "toggleChat"];
|
||||
if(!conf.hasOwnProperty("toggleChat")) conf.toggleChat = true;
|
||||
toggleChat = conf.toggleChat;
|
||||
hasadmin = conf_array.adminpass != "";
|
||||
var show_disabled = true;
|
||||
if(hasadmin && Admin.logged_in || !hasadmin) {
|
||||
@@ -197,6 +197,8 @@ var Admin = {
|
||||
removeplay = form.removeplay.checked;
|
||||
skipping = form.skip.checked;
|
||||
shuffling = form.shuffle.checked;
|
||||
toggleChat = form.toggleChat.checked;
|
||||
|
||||
var pass_send = userpass_changed && !form.userpass.checked ? "" : userpass;
|
||||
configs = {
|
||||
channel: chan.toLowerCase(),
|
||||
@@ -209,6 +211,7 @@ var Admin = {
|
||||
adminpass: adminpass == "" ? "" : Crypt.crypt_pass(adminpass),
|
||||
skipping: skipping,
|
||||
shuffling: shuffling,
|
||||
toggleChat: toggleChat,
|
||||
userpass: Crypt.crypt_pass(pass_send),
|
||||
userpass_changed: userpass_changed
|
||||
};
|
||||
|
||||
@@ -137,7 +137,7 @@ var Chat = {
|
||||
},
|
||||
|
||||
channelchat: function(data, time_sent, disable_blink) {
|
||||
if(data.msg.substring(0,1) == ":" && !chat_active && !disable_blink) {
|
||||
if(data.msg.substring(0,1) == ":" && !chat_active && !disable_blink && data.from.toLowerCase() != "system") {
|
||||
document.querySelector("#favicon").setAttribute("href", "/assets/images/highlogo.png");
|
||||
unseen = true;
|
||||
chat_unseen = true;
|
||||
|
||||
@@ -49,6 +49,7 @@ var frontpage = 1;
|
||||
var adminpass = "";
|
||||
var showDiscovery = false;
|
||||
var player_ready = false;
|
||||
var toggleChat = true;
|
||||
var viewers = 1;
|
||||
var temp_user_pass = "";
|
||||
var zoff_api_token = "DwpnKVkaMH2HdcpJT2YPy783SY33byF5/32rbs0+xdU=";
|
||||
|
||||
@@ -3,148 +3,7 @@
|
||||
<i class="material-icons auto-margin">close</i>
|
||||
</div>
|
||||
<ul class="collapsible collapsible-accordion settings-collapsible">
|
||||
<li class="no-padding">
|
||||
<div class="col s9 collapsible-header bold waves-effect admin-settings">
|
||||
Channel Settings
|
||||
<i class="material-icons">tune</i>
|
||||
</div>
|
||||
<div class="collapsible-body">
|
||||
<ul>
|
||||
<form action="#" id="adminForm" onsubmit="return false;">
|
||||
|
||||
<li class="white-bg">
|
||||
<div class="input-field field-settings">
|
||||
<i id="admin-lock" class="material-icons">lock</i>
|
||||
<input placeholder="Enter admin password" id="password" type="password" class="validate" />
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<span class="switch-text">
|
||||
Add songs
|
||||
</span>
|
||||
<div class="switch">
|
||||
<label>
|
||||
<span class="left-span">Anyone</span>
|
||||
<input name="addsongs" type="checkbox" class="conf" /><span class="lever"></span>
|
||||
<span class="right-span">Admin</span>
|
||||
</label>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class="switch-text">
|
||||
Vote
|
||||
</span>
|
||||
<div class="switch">
|
||||
<label>
|
||||
<span class="left-span">Anyone</span>
|
||||
<input name="vote" type="checkbox" class="conf" /><span class="lever"></span>
|
||||
<span class="right-span">Admin</span>
|
||||
</label>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class="switch-text">
|
||||
Shuffle
|
||||
</span>
|
||||
<div class="switch">
|
||||
<label>
|
||||
<span class="left-span">Anyone</span>
|
||||
<input name="shuffle" type="checkbox" class="conf" /><span class="lever"></span>
|
||||
<span class="right-span">Admin</span>
|
||||
</label>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class="switch-text">
|
||||
Skip
|
||||
</span>
|
||||
<div class="switch">
|
||||
<label>
|
||||
<span class="left-span">Anyone</span>
|
||||
<input name="skip" type="checkbox" class="conf" /><span class="lever"></span>
|
||||
<span class="right-span">Admin</span>
|
||||
</label>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class="switch-text">
|
||||
Song length
|
||||
</span>
|
||||
<div class="switch">
|
||||
<label>
|
||||
<span class="left-span">Any</span>
|
||||
<input name="longsongs" type="checkbox" class="conf" /><span class="lever"></span>
|
||||
<span class="right-span">Short</span>
|
||||
</label>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class="switch-text">
|
||||
Type
|
||||
</span>
|
||||
<div class="switch">
|
||||
<label>
|
||||
<span class="left-span">Any</span>
|
||||
<input name="allvideos" type="checkbox" class="conf" /><span class="lever"></span>
|
||||
<span class="right-span">Song</span>
|
||||
</label>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<span class="switch-text">
|
||||
Frontpage
|
||||
</span>
|
||||
<div class="switch">
|
||||
<label>
|
||||
<span class="left-span">Hide</span>
|
||||
<input name="frontpage" type="checkbox" class="conf" /><span class="lever"></span>
|
||||
<span class="right-span">Display</span>
|
||||
</label>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class="switch-text">
|
||||
After play
|
||||
</span>
|
||||
<div class="switch">
|
||||
<label>
|
||||
<span class="left-span">Keep</span>
|
||||
<input name="removeplay" type="checkbox" class="conf" /><span class="lever"></span>
|
||||
<span class="right-span">Remove</span>
|
||||
</label>
|
||||
</div>
|
||||
</li>
|
||||
<li class="user-password-li hide">
|
||||
<span class="switch-text">
|
||||
Channel password
|
||||
</span>
|
||||
<div class="switch">
|
||||
<label>
|
||||
<span class="left-span">No</span>
|
||||
<input name="userpass" type="checkbox" class="conf password_protected" /><span class="lever"></span>
|
||||
<span class="right-span">Yes</span>
|
||||
</label>
|
||||
</div>
|
||||
</li>
|
||||
</form>
|
||||
|
||||
<li class="change_user_pass hide">
|
||||
<a href="#!" class="change_user_pass_btn btn waves-effect blue">Change password</a>
|
||||
</li>
|
||||
<li class="delete-all hide">
|
||||
<a href="#" class="delete-all-songs btn red">Delete all songs</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
{{> channel/settings}}
|
||||
<li class="no-padding">
|
||||
<div class="collapsible-header bold waves-effect">Channel Info
|
||||
<i class="material-icons">info_outline</i>
|
||||
|
||||
Reference in New Issue
Block a user