Merge pull request #1824 from thelounge/astorije/icons

Improve user and channel icons in channel list and context menu
This commit is contained in:
Pavel Djundik 2017-12-11 13:22:56 +02:00 committed by GitHub
commit 9b75b5727a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 4 deletions

View File

@ -221,7 +221,7 @@ kbd {
#chat button.menu::before { content: "\f142"; /* http://fontawesome.io/icon/ellipsis-v/ */ } #chat button.menu::before { content: "\f142"; /* http://fontawesome.io/icon/ellipsis-v/ */ }
.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: "\f292"; /* http://fontawesome.io/icon/hashtag/ */ }
.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/ */ } .context-menu-list::before { content: "\f03a"; /* http://fontawesome.io/icon/list/ */ }
@ -230,10 +230,10 @@ kbd {
#chat .lobby .title::before { content: "\f0a0"; /* http://fontawesome.io/icon/hdd-o/ */ } #chat .lobby .title::before { content: "\f0a0"; /* http://fontawesome.io/icon/hdd-o/ */ }
#sidebar .chan.query::before, #sidebar .chan.query::before,
#chat .query .title::before { content: "\f0e6"; /* http://fontawesome.io/icon/comments-o/ */ } #chat .query .title::before { content: "\f007"; /* http://fontawesome.io/icon/user/ */ }
#sidebar .chan.channel::before, #sidebar .chan.channel::before,
#chat .channel .title::before { content: "\f0f6"; /* http://fontawesome.io/icon/file-text-o/ */ } #chat .channel .title::before { content: "\f292"; /* http://fontawesome.io/icon/hashtag/ */ }
#sidebar .chan.special::before, #sidebar .chan.special::before,
#chat .special .title::before { content: "\f03a"; /* http://fontawesome.io/icon/list/ */ } #chat .special .title::before { content: "\f03a"; /* http://fontawesome.io/icon/list/ */ }

View File

@ -83,8 +83,18 @@ $(function() {
data: target.data("name"), data: target.data("name"),
}); });
} else if (target.hasClass("chan")) { } else if (target.hasClass("chan")) {
let itemClass;
if (target.hasClass("lobby")) {
itemClass = "network";
} else if (target.hasClass("query")) {
itemClass = "user";
} else {
itemClass = "chan";
}
output = templates.contextmenu_item({ output = templates.contextmenu_item({
class: target.hasClass("lobby") ? "network" : "chan", class: itemClass,
text: target.data("title"), text: target.data("title"),
data: target.data("target"), data: target.data("target"),
}); });