Moved scripts and made toast messages client side

This commit is contained in:
Nicolas A. Tonne
2015-04-16 14:09:45 +02:00
parent c8b2946116
commit 44b41b2386
9 changed files with 52 additions and 26 deletions

View File

@@ -56,6 +56,9 @@ nav .brand-logo{
background-color:rgba(45,45,45,1);
}
.footer-copyright a { color: #fff;}
.footer-copyright a:hover{color:#6699FF}
main {
flex: 1 0 auto;
}
@@ -167,9 +170,7 @@ hide mdi-action-visibility mdi-action-visibility-off
}
.chan{
opacity: 0.9;
text-shadow: 4px 4px 9px rgba(0, 0, 0, 0.42);
}
.nav-btn
@@ -206,8 +207,9 @@ hide mdi-action-visibility mdi-action-visibility-off
#result{height:100px;margin-left:40px;}
#results{margin-top:-12px;background-color: rgba(0,0,0,0.6);}
.result:hover {
background-color: rgba(0,0,0,0.4);}
.result {
background-color: rgba(0,0,0,0.4);
}
.result {
border-bottom: solid 1px #E5E5E5;
text-align: left;
height: 70px;
@@ -240,6 +242,10 @@ hide mdi-action-visibility mdi-action-visibility-off
.switch label input[type=checkbox]:checked + .lever:after {
background-color: white;
}
.switch input[type=checkbox][disabled] + .lever {
cursor: default;
background-color: #939393;
}
.switch label {
color:#848484;

View File

@@ -5,11 +5,36 @@ var pass_corr = "";
socket.on("toast", function(msg)
{
pass_corr = "correct";
switch(msg) {
case "savedsettings":
msg="Saved settings"
break;
case "wrongpass":
msg="Wrong password"
break;
case "shuffled":
msg="Shuffled playlist"
break;
case "deletesong":
msg="Deleted song"
break;
case "vote":
msg="Voted on song"
break;
case "alreadyvoted":
msg="You have already voted on that song"
break;
case "listhaspass":
msg="The list is passwordprotected"
break;
case "noskip":
msg="Only admin can skip songs on this channel"
break;
case "alreadyskip":
msg="You've already voted to skip!"
break;
}
Materialize.toast(msg, 4000);
/*document.getElementById("sBar").innerHTML = msg;
$("#sBar").addClass("opacityFull");
document.getElementById("passbox").value = "";
remove_bar();*/
});
socket.on("pw", function(msg)
@@ -22,7 +47,7 @@ socket.on("pw", function(msg)
}
$(".card-action").removeClass("hide");
localStorage.setItem("passord_i_klartekst_lol", msg);
Materialize.toast("Correct Password!", 4000);
Materialize.toast("Correct Password. You are now admin", 4000);
});
socket.on(chan.toLowerCase()+",conf", function(msg)