diff --git a/client/css/style.css b/client/css/style.css index cb9f65eb..315eddb6 100644 --- a/client/css/style.css +++ b/client/css/style.css @@ -1167,6 +1167,7 @@ button, font: inherit; font-size: 11px; margin: 5px; + margin-right: 10px; line-height: 26px; height: 24px; padding: 0 9px; @@ -1177,6 +1178,14 @@ button, user-select: none; } +#form #nick:empty { + visibility: hidden; +} + +#form #nick:after { + content: ":"; +} + #form #input { border: 1px solid #ddd; font: inherit; diff --git a/client/js/lounge.js b/client/js/lounge.js index ad2194c8..451e028d 100644 --- a/client/js/lounge.js +++ b/client/js/lounge.js @@ -678,12 +678,7 @@ $(function() { document.title = title; if (self.hasClass("chan")) { - var nick = self - .closest(".network") - .data("nick"); - if (nick) { - setNick(nick); - } + setNick(self.closest(".network").data("nick")); } if (chan.data("needsNamesRefresh") === true) { @@ -1081,12 +1076,9 @@ $(function() { function setNick(nick) { var width = $("#nick") - .html(nick + ":") - .width(); - if (width) { - width += 31; - input.css("padding-left", width); - } + .html(nick) + .outerWidth(true); + input.css("padding-left", width); } function move(array, old_index, new_index) {