From: Darren Date: Sat, 22 Jun 2013 16:39:43 +0000 (+0100) Subject: Using CSS to hide repeated nicks X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a2a409db8a148669ec67d44497b80aa710b24684;p=KiwiIRC.git Using CSS to hide repeated nicks --- diff --git a/client/assets/css/style.css b/client/assets/css/style.css index 2a10591..03135ea 100644 --- a/client/assets/css/style.css +++ b/client/assets/css/style.css @@ -578,6 +578,7 @@ html, body { height:100%; } #kiwi.theme_relaxed .messages .msg.global_nick_highlight, #kiwi.theme_relaxed .messages .msg.highlight { background:#D9D9D9; } +#kiwi.theme_relaxed .messages .msg.repeated_nick .nick { visibility:hidden; } /* Narrow styling (window width < 400px) */ #kiwi.theme_relaxed.narrow .messages .msg .nick { width: auto; } diff --git a/client/assets/src/views/panel.js b/client/assets/src/views/panel.js index 553f2d4..bcc8ac1 100644 --- a/client/assets/src/views/panel.js +++ b/client/assets/src/views/panel.js @@ -121,7 +121,7 @@ _kiwi.view.Panel = Backbone.View.extend({ // Time difference between this message and the last (in minutes) time_difference = (template_vars.date.getTime() - prev_msg.date.getTime())/1000/60; if (prev_msg.nick === template_vars.nick && time_difference < 1) { - template_vars.nick = ''; + msg_css_classes += ' repeated_nick'; } }