diff --git a/README.md b/README.md index bd7ff8f9..b5815987 100644 --- a/README.md +++ b/README.md @@ -104,18 +104,11 @@ Pretty simple, huh? If you want to edit users manually, see `users/example/user.json`. -## Custom paths - -You can define Shout's file storage path via the following options: - -- Add an entry called `home` to the `config.json` file. -- Set the environment variable `SHOUT_HOME` before calling the shout executable. -- Use the default of `$HOME/.shout`. - ## Commands These are the commands currently implemented: +- [x] /clear - [x] /close - [x] /connect - [x] /deop diff --git a/client/css/style.css b/client/css/style.css index fffab5a1..6a054c8a 100644 --- a/client/css/style.css +++ b/client/css/style.css @@ -446,8 +446,8 @@ button { position: absolute; width: 100%; } -#chat .show-more + .messages .msg:first-child span { - padding-top: 54px; +#chat .show-more:hover { + opacity: 1; } #chat .messages { display: table; diff --git a/client/js/shout.js b/client/js/shout.js index 0ad05c08..b9426993 100644 --- a/client/js/shout.js +++ b/client/js/shout.js @@ -190,7 +190,7 @@ $(function() { if (data.messages.length != 100) { var more = chan .find(".show-more") - .remove(); + .addClass("hidden"); } }); @@ -317,6 +317,9 @@ $(function() { e.preventDefault(); var text = input.val(); input.val(""); + if (text.indexOf("/clear") === 0) { + return clear(); + } socket.emit("input", { target: chat.data("id"), text: text @@ -572,12 +575,16 @@ $(function() { "ctrl+l", "ctrl+shift+l" ], function (e) { - // Only clear the chat if the main input is focused. - if( e.target === input[0] ) { - chat.find(".active .chat .messages").empty(); + if(e.target === input[0]) { + clear(); } }); + function clear() { + chat.find(".active .messages").empty(); + chat.find(".active .show-more").removeClass("hidden"); + } + function complete(word) { var words = commands.slice(); var users = chat.find(".active") diff --git a/client/js/shout.templates.js b/client/js/shout.templates.js index 3509a49e..2ad5a5d8 100644 --- a/client/js/shout.templates.js +++ b/client/js/shout.templates.js @@ -33,7 +33,7 @@ templates['chat'] = template({"1":function(depth0,helpers,partials,data) { + "\n " + escapeExpression(((helper = (helper = helpers.type || (depth0 != null ? depth0.type : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"type","hash":{},"data":data}) : helper))) + " \n \n
\n"; - stack1 = ((helpers.equal || (depth0 && depth0.equal) || helperMissing).call(depth0, 100, ((stack1 = (depth0 != null ? depth0.messages : depth0)) != null ? stack1.length : stack1), {"name":"equal","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data})); + stack1 = ((helpers.equal || (depth0 && depth0.equal) || helperMissing).call(depth0, 100, ((stack1 = (depth0 != null ? depth0.messages : depth0)) != null ? stack1.length : stack1), {"name":"equal","hash":{},"fn":this.program(2, data),"inverse":this.program(4, data),"data":data})); if (stack1 != null) { buffer += stack1; } return buffer + "
\n " + escapeExpression(((helpers.partial || (depth0 && depth0.partial) || helperMissing).call(depth0, "msg", {"name":"partial","hash":{},"data":data}))) @@ -45,6 +45,11 @@ templates['chat'] = template({"1":function(depth0,helpers,partials,data) { return " \n"; +},"4":function(depth0,helpers,partials,data) { + var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; + return " \n"; },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { var stack1, buffer = ""; stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.channels : depth0), {"name":"each","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}); diff --git a/client/templates/chat.tpl b/client/templates/chat.tpl index 39f83e60..011d7cd8 100644 --- a/client/templates/chat.tpl +++ b/client/templates/chat.tpl @@ -11,6 +11,10 @@ + {{else}} + {{/equal}}
{{partial "msg"}}