diff --git a/css/glowingbear.css b/css/glowingbear.css index e400f81..b44c71a 100644 --- a/css/glowingbear.css +++ b/css/glowingbear.css @@ -105,8 +105,10 @@ body { padding-bottom:70px; } -input#sendMessage { +#sendMessage { width: 100%; + height: 36px; + resize: none; } #footer button { border-radius: 0; @@ -114,7 +116,7 @@ input#sendMessage { .panel input, .panel .input-group { max-width: 300px; } -input[type=text], input[type=password], .badge { +input[type=text], input[type=password], #sendMessage, .badge { border: 0; border-radius: 0; color: #ccc; @@ -140,7 +142,7 @@ input[type=text], input[type=password], .badge { } #topbar .title { position: fixed; - left: 14%; + left: 145px; /* sidebar */ overflow: hidden; } #topbar .actions { @@ -160,10 +162,9 @@ input[type=text], input[type=password], .badge { } #sidebar { position: fixed; - width: 12%; + width: 140px; min-height: 100%; height: 100%; - min-width: 130px; overflow: auto; padding-top: 35px; /* topbar */ font-size: smaller; @@ -232,10 +233,11 @@ input[type=text], input[type=password], .badge { position: relative; height: 99%; overflow-y: auto; - margin-left: 14%; /* sidebar */ + margin-left: 145px; /* sidebar */ width: auto; top: 25px; /* topbar */ padding-bottom: 10px; + margin-right: -5px; } .withnicklist { margin-right: 100px !important; /* nicklist */ @@ -245,7 +247,7 @@ input[type=text], input[type=password], .badge { } .navbar-fixed-bottom { - margin: 0 5px 0 14%; + margin: 0 5px 0 145px; /* sidebar */ } .navbar-inverse { background-color: #181818; @@ -263,6 +265,9 @@ input[type=text], input[type=password], .badge { width: 100%; text-align: center; } + #bufferlines { + padding-bottom: 55px; /* navbar fixed bottom */ + } .navbar-fixed-bottom { margin: 0 5px 0 5px; } diff --git a/css/style.css b/css/style.css index dfb4682..59b84b8 100644 --- a/css/style.css +++ b/css/style.css @@ -45,7 +45,8 @@ color: #77dfd8; } .cof-chat_nick_self { - color: #fff1bd; + color: #ffffff; + font-weight: bold; } .cof-chat_nick_other { color: #77dfd8; diff --git a/directives/input.html b/directives/input.html index 43fd60d..181748f 100644 --- a/directives/input.html +++ b/directives/input.html @@ -1,6 +1,7 @@ -
+
- + diff --git a/index.html b/index.html index cbcfb8e..45f9406 100644 --- a/index.html +++ b/index.html @@ -150,9 +150,8 @@ $ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out rel
- brand + brand
-
{{ host }}:{{ port }}
- - + + - + diff --git a/js/models.js b/js/models.js index 79f5070..bb9a41b 100644 --- a/js/models.js +++ b/js/models.js @@ -361,15 +361,17 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) /* * Closes a weechat buffer. Sets the first buffer - * as active. + * as active, if the closing buffer was active before * * @param bufferId id of the buffer to close * @return undefined */ this.closeBuffer = function(bufferId) { - + var wasActive = this.model['buffers'][bufferId.id].active; + if(wasActive) { + var firstBuffer = _.keys(this.model['buffers'])[0]; + this.setActiveBuffer(firstBuffer); + } delete(this.model['buffers'][bufferId.id]); - var firstBuffer = _.keys(this.model['buffers'])[0]; - this.setActiveBuffer(firstBuffer); } }]); diff --git a/js/websockets.js b/js/websockets.js index c1d5995..db1d9af 100644 --- a/js/websockets.js +++ b/js/websockets.js @@ -731,7 +731,11 @@ weechat.directive('inputBar', function() { // Send the message to the websocket $scope.sendMessage = function() { - connection.sendMessage($scope.command); + // Split the command into multiple commands based on line breaks + var commands = $scope.command.split(/\r?\n/); + commands.forEach(function(c) { + connection.sendMessage(c); + }); $scope.command = ""; } @@ -771,6 +775,13 @@ weechat.directive('inputBar', function() { return true; } + // Left Alt+n -> toggle nicklist + if ($event.altKey && !$event.ctrlKey && code == 78) { + $event.preventDefault(); + $scope.nonicklist = !$scope.nonicklist; + return true; + } + // Alt+A -> switch to buffer with activity if ($event.altKey && (code == 97 || code == 65)) { $event.preventDefault(); @@ -801,6 +812,15 @@ weechat.directive('inputBar', function() { return true; } + // Enter to submit, shift-enter for newline + if (code == 13 && !$event.shiftKey) { + $event.preventDefault(); + // Prevent inprog + setTimeout(function() {$('#inputform').submit();},0); + return true; + } + + } }
{{ bufferline.date | date:'HH' }}:{{ bufferline.date | date:'mm' }} @@ -266,9 +265,9 @@ $ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out rel
-
+