Merge pull request #1802 from MaxLeiter/chanlist
Add 'Channel list' to network context menu
This commit is contained in:
commit
de98c2b13a
@ -223,6 +223,7 @@ kbd {
|
|||||||
.context-menu-user::before { content: "\f007"; /* http://fontawesome.io/icon/user/ */ }
|
.context-menu-user::before { content: "\f007"; /* http://fontawesome.io/icon/user/ */ }
|
||||||
.context-menu-chan::before { content: "\f0f6"; /* http://fontawesome.io/icon/file-text-o/ */ }
|
.context-menu-chan::before { content: "\f0f6"; /* http://fontawesome.io/icon/file-text-o/ */ }
|
||||||
.context-menu-close::before { content: "\f00d"; /* http://fontawesome.io/icon/times/ */ }
|
.context-menu-close::before { content: "\f00d"; /* http://fontawesome.io/icon/times/ */ }
|
||||||
|
.context-menu-list::before { content: "\f03a"; /* http://fontawesome.io/icon/list/ */ }
|
||||||
|
|
||||||
#sidebar .chan.lobby::before,
|
#sidebar .chan.lobby::before,
|
||||||
#chat .lobby .title::before { content: "\f0a0"; /* http://fontawesome.io/icon/hdd-o/ */ }
|
#chat .lobby .title::before { content: "\f0a0"; /* http://fontawesome.io/icon/hdd-o/ */ }
|
||||||
|
@ -89,6 +89,13 @@ $(function() {
|
|||||||
data: target.data("target"),
|
data: target.data("target"),
|
||||||
});
|
});
|
||||||
output += templates.contextmenu_divider();
|
output += templates.contextmenu_divider();
|
||||||
|
if (target.hasClass("lobby")) {
|
||||||
|
output += templates.contextmenu_item({
|
||||||
|
class: "list",
|
||||||
|
text: "List all channels",
|
||||||
|
data: target.data("target"),
|
||||||
|
});
|
||||||
|
}
|
||||||
output += templates.contextmenu_item({
|
output += templates.contextmenu_item({
|
||||||
class: "close",
|
class: "close",
|
||||||
text: target.hasClass("lobby") ? "Disconnect" : target.hasClass("channel") ? "Leave" : "Close",
|
text: target.hasClass("lobby") ? "Disconnect" : target.hasClass("channel") ? "Leave" : "Close",
|
||||||
@ -441,6 +448,12 @@ $(function() {
|
|||||||
case "user":
|
case "user":
|
||||||
$(".channel.active .users .user[data-name='" + $(this).data("data") + "']").click();
|
$(".channel.active .users .user[data-name='" + $(this).data("data") + "']").click();
|
||||||
break;
|
break;
|
||||||
|
case "list":
|
||||||
|
socket.emit("input", {
|
||||||
|
target: chat.data("id"),
|
||||||
|
text: "/list",
|
||||||
|
});
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user