From 499dfdfe928867b9d4fbb46ef331613a2d193ae3 Mon Sep 17 00:00:00 2001 From: Alistair McKinlay Date: Thu, 22 Jun 2017 21:08:36 +0100 Subject: [PATCH] Condense Joins --- client/css/style.css | 47 +++++++++++++++++++++---- client/index.html | 34 +++++------------- client/js/condensed.js | 37 ++++++++++++++++++++ client/js/constants.js | 32 +++++++++++++++-- client/js/lounge.js | 11 ++++++ client/js/options.js | 17 ++------- client/js/render.js | 62 ++++++++++++++++++++++----------- client/js/socket-events/more.js | 8 ++++- client/js/socket-events/msg.js | 32 +++++++++++------ client/views/index.js | 1 + client/views/msg_action.tpl | 3 +- client/views/msg_condensed.tpl | 7 ++++ 12 files changed, 209 insertions(+), 82 deletions(-) create mode 100644 client/js/condensed.js create mode 100644 client/views/msg_condensed.tpl diff --git a/client/css/style.css b/client/css/style.css index e517fe36..2c3a12ff 100644 --- a/client/css/style.css +++ b/client/css/style.css @@ -197,6 +197,7 @@ kbd { #settings #play:before, #form #submit:before, #chat .invite .from:before, +#chat .condensed .expander:before, #chat .join .from:before, #chat .kick .from:before, #chat .part .from:before, @@ -284,6 +285,22 @@ kbd { color: #2ecc40; } +#chat .condensed { + cursor: pointer; +} + +#chat .condensed div { + cursor: default; +} + +#chat .condensed .expander:before { + content: "\f0d7"; /* http://fontawesome.io/icon/caret-down/ */ +} + +#chat .condensed.closed .expander:before { + content: "\f0da"; /* http://fontawesome.io/icon/caret-right/ */ +} + #chat .join .from:before { content: "\f090"; /* http://fontawesome.io/icon/sign-in/ */ color: #2ecc40; @@ -801,6 +818,18 @@ kbd { display: block; } +#chat .condensed { + flex-wrap: wrap; +} + +#chat .condensed .msg { + flex-basis: 100%; +} + +#chat .condensed.closed .msg { + display: none; +} + #windows .header .topic, .messages .msg, .sidebar { @@ -1092,15 +1121,17 @@ kbd { color: #555; } -#chat.hide-join .join, -#chat.hide-mode .mode, -#chat.hide-motd .motd, -#chat.hide-nick .nick, -#chat.hide-part .part, -#chat.hide-quit .quit { +#chat.hide-optional .join, +#chat.hide-optional .mode, +#chat.hide-optional .nick, +#chat.hide-optional .part, +#chat.hide-optional .quit, +#chat.hide-optional .condensed, +#chat.hide-motd .motd { display: none !important; } +#chat .condensed .content, #chat .join .content, #chat .kick .content, #chat .mode .content, @@ -2130,3 +2161,7 @@ part/quit messages where we don't load previews (adds a blank line otherwise) */ #chat table.channel-list .topic { white-space: pre-wrap; } + +.hide-text { + color: transparent !important; +} diff --git a/client/index.html b/client/index.html index d8d39618..2e8eae1b 100644 --- a/client/index.html +++ b/client/index.html @@ -218,8 +218,14 @@
+
+
+
@@ -228,30 +234,6 @@ Show MOTD
-
- -
-
- -
-
- -
-
- -