Merge pull request #1114 from AStove/HideTimes

Hide bufferline times for relay buffers
This commit is contained in:
Lorenz Hübschle-Schneider 2020-04-22 11:46:11 +02:00 committed by GitHub
commit 3d96706a3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 2 deletions

View File

@ -960,3 +960,11 @@ code {
color: #444;
border: 1pt solid #444;
}
#bufferlines.hideTime td.time {
display:none;
}
#bufferlines.hideTime td.prefix {
display:none;
}

View File

@ -395,7 +395,7 @@ npm run build-electron-{windows, darwin, linux}</pre>
</li>
</ul>
</div>
<div id="bufferlines" class="favorite-font" ng-swipe-right="swipeRight()" ng-swipe-left="swipeLeft()" ng-swipe-disable-mouse ng-class="{'withnicklist': showNicklist}" when-scrolled="infiniteScroll()" imgur-drop>
<div id="bufferlines" class="favorite-font" ng-swipe-right="swipeRight()" ng-swipe-left="swipeLeft()" ng-swipe-disable-mouse ng-class="{'withnicklist': showNicklist, 'hideTime': activeBuffer().hideBufferLineTimes}" when-scrolled="infiniteScroll()" imgur-drop>
<table>
<tbody>
<tr class="bufferline">

View File

@ -90,7 +90,9 @@ models.service('models', ['$rootScope', '$filter', 'bufferResume', function($roo
// There are two kinds of types: bufferType (free vs formatted) and
// the kind of type that distinguishes queries from channels etc
var bufferType = message.type;
var type = message.local_variables.type;
// If type is undefined set it as other to avoid later errors
var type = message.local_variables.type || 'other';
var indent = (['channel', 'private'].indexOf(type) >= 0);
var plugin = message.local_variables.plugin;
@ -98,6 +100,9 @@ models.service('models', ['$rootScope', '$filter', 'bufferResume', function($roo
var pinned = message.local_variables.pinned === "true";
// hide timestamps for certain buffer types
var hideBufferLineTimes = type && type === 'relay';
// Server buffers have this "irc.server.freenode" naming schema, which
// messes the sorting up. We need it to be "irc.freenode" instead.
var serverSortKey = plugin + "." + server +
@ -365,6 +370,7 @@ models.service('models', ['$rootScope', '$filter', 'bufferResume', function($roo
getHistoryDown: getHistoryDown,
isNicklistEmpty: isNicklistEmpty,
nicklistRequested: nicklistRequested,
hideBufferLineTimes: hideBufferLineTimes,
pinned: pinned,
queryNicklist: queryNicklist,
};