Style chat time. Hide lines with repeated time
This commit is contained in:
parent
f7de27eff7
commit
66963d8329
4 changed files with 9 additions and 3 deletions
|
@ -57,6 +57,9 @@ td.time {
|
|||
vertical-align: top;
|
||||
}
|
||||
|
||||
.repeated-time {
|
||||
display: none;
|
||||
}
|
||||
td.prefix {
|
||||
text-align: right;
|
||||
vertical-align: top;
|
||||
|
|
|
@ -116,6 +116,7 @@
|
|||
.cob-chat {
|
||||
}
|
||||
.cob-chat_time {
|
||||
color: #999;
|
||||
}
|
||||
.cob-chat_time_delimiters {
|
||||
}
|
||||
|
|
|
@ -216,9 +216,9 @@ $ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out rel
|
|||
<div id="bufferlines">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr class="bufferline" ng-repeat-start="bufferline in activeBuffer().lines">
|
||||
<tr class="bufferline" ng-repeat-start="bufferline in (bufferlines = activeBuffer().lines)">
|
||||
<td ng-hide="notimestamp" class="time">
|
||||
<span class="date text-muted">
|
||||
<span class="date" ng-class="{'repeated-time': bufferline.shortTime==bufferlines[$index-1].shortTime}">
|
||||
<span class="cof-chat_time cob-chat_time coa-chat_time">{{ bufferline.date | date:'HH' }}</span><span class="cof-chat_time_delimiters cob-chat_time_delimiters coa-chat_time_delimiters">:</span><span class="cof-chat_time cob-chat_time coa-chat_time">{{ bufferline.date | date:'mm' }}</span>
|
||||
</span>
|
||||
</td>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
var models = angular.module('weechatModels', []);
|
||||
|
||||
models.service('models', ['$rootScope', function($rootScope) {
|
||||
models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) {
|
||||
/*
|
||||
* Buffer class
|
||||
*/
|
||||
|
@ -61,6 +61,7 @@ models.service('models', ['$rootScope', function($rootScope) {
|
|||
this.BufferLine = function(message) {
|
||||
var buffer = message['buffer'];
|
||||
var date = message['date'];
|
||||
var shortTime = $filter('date')(date, 'HH:mm');
|
||||
|
||||
function addClasses(textElements) {
|
||||
var typeToClassPrefixFg = {
|
||||
|
@ -118,6 +119,7 @@ models.service('models', ['$rootScope', function($rootScope) {
|
|||
prefix: prefix,
|
||||
content: content,
|
||||
date: date,
|
||||
shortTime: shortTime,
|
||||
buffer: buffer,
|
||||
tags: tags_array,
|
||||
highlight: highlight,
|
||||
|
|
Loading…
Reference in a new issue