Added user count

This commit is contained in:
Mattias Erming 2014-04-14 17:18:18 +02:00
parent 0c20e29c41
commit 738c61350e
4 changed files with 10 additions and 8 deletions

View File

@ -189,8 +189,11 @@ h2 {
top: 0; top: 0;
width: 160px; width: 160px;
} }
#chat .users .count {
color: #bbb;
padding: 0 8px;
}
#chat .users .user { #chat .users .user {
display: block;
padding: 0 8px; padding: 0 8px;
} }
#chat .messages { #chat .messages {

View File

@ -39,6 +39,7 @@
<input type="checkbox" value="nick"/> <input type="checkbox" value="nick"/>
<input type="checkbox" value="quit"/> <input type="checkbox" value="quit"/>
<input type="checkbox" value="mode"/> <input type="checkbox" value="mode"/>
<input type="checkbox" value="kick"/>
</div> </div>
</div> </div>
</div> </div>
@ -97,6 +98,9 @@
{{/channels}} {{/channels}}
</script> </script>
<script type="text/html" id="user"> <script type="text/html" id="user">
<div class="count">
Users: {{users.length}}
</div>
{{#users}} {{#users}}
<div class="user"> <div class="user">
{{name}} {{name}}

View File

@ -123,12 +123,7 @@ $(function() {
break; break;
case "user": case "user":
var target = chat.find("#window-" + json.target); var target = chat.find("#window-" + json.target).find(".users");
if (target.size() == 0) {
return;
}
target = target.find(".users");
target.html(render("#user", {users: json.data})); target.html(render("#user", {users: json.data}));
break; break;

2
node_modules/slate-irc generated vendored

@ -1 +1 @@
Subproject commit f992e474d7ad7a79b129c289fb744c2522a99e8c Subproject commit 3cab2d2011e20d5cd2492e901cf029dbbff16006