diff --git a/css/glowingbear.css b/css/glowingbear.css index c2de348..a068f2f 100644 --- a/css/glowingbear.css +++ b/css/glowingbear.css @@ -1,7 +1,10 @@ body { color: white; background-color: #222; - padding: 5px; + padding-left: 5px; + padding-right: 5px; + padding-bottom:70px; + padding-top: 70px; } .bufferlines { font-family: monospace; diff --git a/index.html b/index.html index f0b3e27..4dabe2c 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,8 @@ - + + @@ -20,14 +21,14 @@

- - glowing bear - - WeeChat web frontend - + + glowing bear + + WeeChat web frontend +

To start using, please enable relay in your WeeChat client: -
+          
             /set relay.network.password yourpassword
             /relay add weechat 9001
Note: The communication goes directly between your browser and your weechat in clear text. @@ -35,36 +36,45 @@

Connection settings

-
- Oh no! We cannot connect! -
-
- - -

Enter the hostname and the port to the WeeChat relay, separated by a :

-
-
- - -

Password will be stored in your browser session

-
-
- - -

Default is fine.

-
- +
+ Oh no! We cannot connect! +
+
+ + +

Enter the hostname and the port to the WeeChat relay, separated by a :

+
+
+ + +

Password will be stored in your browser session

+
+
+ + +

Default is fine.

+
+
- - +
diff --git a/js/websockets.js b/js/websockets.js index fc79f93..c7c27c0 100644 --- a/js/websockets.js +++ b/js/websockets.js @@ -290,7 +290,11 @@ weechat.factory('handlers', ['$rootScope', 'colors', 'pluginManager', function($ if (!_isActiveBuffer(buffer) && !initial) { - $rootScope.buffers[buffer]['notification'] = true; + + if ($rootScope.buffers[buffer]['unread'] == '') { + $rootScope.buffers[buffer]['unread'] == 0; + } + $rootScope.buffers[buffer]['unread'] += 1; } if (text[0] != undefined) { @@ -365,10 +369,12 @@ weechat.factory('handlers', ['$rootScope', 'colors', 'pluginManager', function($ var pointer = bufferInfo['pointers'][0]; bufferInfo['id'] = pointer; bufferInfo['lines'] = []; + bufferInfo['unread'] = ''; buffers[pointer] = bufferInfo if (i == 0) { // first buffer is active buffer by default $rootScope.activeBuffer = buffers[pointer]; + $rootScope.activeBuffer['active'] = true; } } $rootScope.buffers = buffers; @@ -412,7 +418,7 @@ weechat.factory('handlers', ['$rootScope', 'colors', 'pluginManager', function($ _buffer_closing: handleBufferClosing, _buffer_line_added: handleBufferLineAdded, _buffer_opened: handleBufferOpened, - _buffer_title_changed: handleBufferTitleChanged, + _buffer_title_changed: handleBufferTitleChanged } return { @@ -536,8 +542,9 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', 'connection } $scope.setActiveBuffer = function(key) { - $rootScope.activeBuffer['notification'] = false; - $rootScope.buffers[key]['notification'] = true; + $rootScope.activeBuffer['active'] = false; + $rootScope.buffers[key]['active'] = true; + $rootScope.buffers[key]['unread'] = ''; $rootScope.activeBuffer = $rootScope.buffers[key]; $rootScope.pageTitle = $rootScope.activeBuffer['short_name'] + ' | ' + $rootScope.activeBuffer['title']; };