Change modflair label to "Name Color"

Also combined adminflair and modflair into one button (the button has 2
states if you're a moderator, or 3 states if you're a site
administrator).  Resolves #517
This commit is contained in:
calzoneman 2016-03-29 22:30:16 -07:00
parent 9debebd4b9
commit 4e011c0d26
3 changed files with 13 additions and 19 deletions

View file

@ -41,8 +41,7 @@ html(lang="en")
#chatheader
i#userlisttoggle.glyphicon.glyphicon-chevron-down.pull-left.pointer(title="Show/Hide Userlist")
span#usercount.pointer Not Connected
span#modflair.label.label-default.pull-right.pointer M
span#adminflair.label.label-default.pull-right.pointer A
span#modflair.label.label-default.pull-right.pointer Name Color
#userlist
#messagebuffer.linewrap
input#chatline.form-control(type="text", maxlength="240", style="display: none")

View file

@ -28,7 +28,16 @@ $("#modflair").click(function () {
var m = $("#modflair");
if (m.hasClass("label-success")) {
USEROPTS.modhat = false;
m.removeClass("label-success")
m.removeClass("label-success");
if (SUPERADMIN) {
USEROPTS.adminhat = true;
m.addClass("label-danger");
} else {
m.addClass("label-default");
}
} else if (m.hasClass("label-danger")) {
USEROPTS.adminhat = false;
m.removeClass("label-danger")
.addClass("label-default");
} else {
USEROPTS.modhat = true;
@ -37,19 +46,6 @@ $("#modflair").click(function () {
}
});
$("#adminflair").click(function () {
var m = $("#adminflair");
if (m.hasClass("label-danger")) {
USEROPTS.adminhat = false;
m.removeClass("label-danger")
.addClass("label-default");
} else {
USEROPTS.adminhat = true;
m.removeClass("label-default")
.addClass("label-danger");
}
});
$("#usercount").mouseenter(function (ev) {
var breakdown = calcUserBreakdown();
// re-using profile-box class for convenience

View file

@ -930,7 +930,6 @@ function handlePermissionChange() {
setVisible("#showchansettings", CLIENT.rank >= 2);
setVisible("#playlistmanagerwrap", CLIENT.rank >= 1);
setVisible("#modflair", CLIENT.rank >= 2);
setVisible("#adminflair", CLIENT.rank >= 255);
setVisible("#guestlogin", CLIENT.rank < 0);
setVisible("#chatline", CLIENT.rank >= 0);
setVisible("#queue", hasPermission("seeplaylist"));