Adds prefix to chat messages
This commit is contained in:
parent
e250bae9c7
commit
6cf0e687b7
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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()">
|
||||||
|
|
Loading…
Reference in New Issue