diff --git a/client/css/style.css b/client/css/style.css index 6a0b0408..ce41be48 100644 --- a/client/css/style.css +++ b/client/css/style.css @@ -141,6 +141,7 @@ button { #footer .icon, #chat .count:before, #settings #play:before, +#form #cycle-nicks:before, #form #submit:before, #chat .invite .from:before, #chat .join .from:before, @@ -186,6 +187,8 @@ button { #footer .settings:before { content: "\f013"; /* http://fontawesome.io/icon/cog/ */ } #footer .sign-out:before { content: "\f011"; /* http://fontawesome.io/icon/power-off/ */ } +#form #cycle-nicks:before { content: "\f007"; /* http://fontawesome.io/icon/user/ */ } + #form #submit:before { content: "\f1d8"; /* http://fontawesome.io/icon/paper-plane/ */ } #chat .invite .from:before { @@ -1362,16 +1365,22 @@ button { align-self: center; } +#form #cycle-nicks, #form #submit { color: #9ca5b4; font-size: 14px; height: 32px; transition: opacity .2s; - width: 32px; + width: 24px; -webkit-flex: 0 0 auto; flex: 0 0 auto; } +#form #submit { + margin-right: 4px; +} + +#form #cycle-nicks:hover, #form #submit:hover { opacity: .6; } diff --git a/client/index.html b/client/index.html index 1e6098e1..4226476f 100644 --- a/client/index.html +++ b/client/index.html @@ -66,6 +66,9 @@ --> + + + diff --git a/client/js/lounge.js b/client/js/lounge.js index 4b3ecd70..8450f43f 100644 --- a/client/js/lounge.js +++ b/client/js/lounge.js @@ -721,6 +721,12 @@ $(function() { }) .tab(complete, {hint: false}); + // Cycle through nicks for the current word, just like hitting "Tab" + $("#cycle-nicks").on("click", function() { + input.triggerHandler($.Event("keydown.tabcomplete", {which: 9})); + focus(); + }); + $("#form").on("submit", function(e) { e.preventDefault(); var text = input.val();