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;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.repeated-time {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
td.prefix {
|
td.prefix {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
|
|
|
@ -116,6 +116,7 @@
|
||||||
.cob-chat {
|
.cob-chat {
|
||||||
}
|
}
|
||||||
.cob-chat_time {
|
.cob-chat_time {
|
||||||
|
color: #999;
|
||||||
}
|
}
|
||||||
.cob-chat_time_delimiters {
|
.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">
|
<div id="bufferlines">
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<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">
|
<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 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>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*/
|
*/
|
||||||
var models = angular.module('weechatModels', []);
|
var models = angular.module('weechatModels', []);
|
||||||
|
|
||||||
models.service('models', ['$rootScope', function($rootScope) {
|
models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) {
|
||||||
/*
|
/*
|
||||||
* Buffer class
|
* Buffer class
|
||||||
*/
|
*/
|
||||||
|
@ -61,6 +61,7 @@ models.service('models', ['$rootScope', function($rootScope) {
|
||||||
this.BufferLine = function(message) {
|
this.BufferLine = function(message) {
|
||||||
var buffer = message['buffer'];
|
var buffer = message['buffer'];
|
||||||
var date = message['date'];
|
var date = message['date'];
|
||||||
|
var shortTime = $filter('date')(date, 'HH:mm');
|
||||||
|
|
||||||
function addClasses(textElements) {
|
function addClasses(textElements) {
|
||||||
var typeToClassPrefixFg = {
|
var typeToClassPrefixFg = {
|
||||||
|
@ -118,6 +119,7 @@ models.service('models', ['$rootScope', function($rootScope) {
|
||||||
prefix: prefix,
|
prefix: prefix,
|
||||||
content: content,
|
content: content,
|
||||||
date: date,
|
date: date,
|
||||||
|
shortTime: shortTime,
|
||||||
buffer: buffer,
|
buffer: buffer,
|
||||||
tags: tags_array,
|
tags: tags_array,
|
||||||
highlight: highlight,
|
highlight: highlight,
|
||||||
|
|
Loading…
Reference in a new issue