Adds prefix to chat messages

This commit is contained in:
David Cormier 2013-07-28 00:01:35 -04:00
parent e250bae9c7
commit 6cf0e687b7
2 changed files with 7 additions and 4 deletions

View File

@ -168,8 +168,11 @@ weechat.factory('connection', ['$rootScope', 'colors', function($scope, colors)
var handleBufferLineAdded = function(message) { var handleBufferLineAdded = function(message) {
var buffer_line = colors.parse(message['objects'][0]['content'][0]['message']);
var prefix = colors.parse(message['objects'][0]['content'][0]['prefix']);
var message = colors.parse(message['objects'][0]['content'][0]['message']);
var buffer_line = _.union(prefix, message);
$scope.buffer.push(buffer_line); $scope.buffer.push(buffer_line);
} }

View File

@ -40,9 +40,9 @@
<div ng-show="connected"> <div ng-show="connected">
<div ng-repeat="bufferline in buffer"> <div ng-repeat="bufferline in buffer">
<p> <p>
<div ng-repeat="part in bufferline"> <span ng-repeat="part in bufferline" class="text">
<span class="text">{{ part.text }}</span> {{ part.text }}
</div> </span>
</p> </p>
</div> </div>
<form ng-submit="sendMessage()"> <form ng-submit="sendMessage()">