Move unread class to buffer <li> instead of ng-if on badge
Enables theming, fixes #828 which is now possible with custom CSS
This commit is contained in:
parent
f4669f37ee
commit
b59aa31049
2 changed files with 9 additions and 3 deletions
|
@ -216,7 +216,13 @@ input[type=text], input[type=password], #sendMessage {
|
|||
display:block!important;
|
||||
}
|
||||
|
||||
#sidebar .badge {
|
||||
|
||||
#sidebar .buffer .badge {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#sidebar .buffer.unread .badge {
|
||||
display: inline-block;
|
||||
border-radius: 0;
|
||||
margin-right: -10px;
|
||||
padding: 4px 7px;
|
||||
|
|
|
@ -271,9 +271,9 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
|
|||
<input class="form-control favorite-font" type="text" id="bufferFilter" ng-model="search" ng-keydown="handleSearchBoxKey($event)" placeholder="Search" autocomplete="off">
|
||||
</form>
|
||||
</li>
|
||||
<li class="buffer" ng-class="{'active': buffer.active, 'highlight': search && search_highlight_key === key, 'indent': buffer.indent, 'channel': buffer.type === 'channel', 'channel_hash': buffer.prefix === '#', 'channel_plus': buffer.prefix === '+', 'channel_ampersand': buffer.prefix === '&', 'private': buffer.type === 'private'}" ng-repeat="(key, buffer) in (filteredBuffers = (getBuffers() | toArray:'withidx' | filter:{fullName:search} | filter:hasUnread | orderBy:predicate | getBufferQuickKeys:this))">
|
||||
<li class="buffer" ng-class="{'active': buffer.active, 'unread': (buffer.notification || buffer.unread), 'highlight': search && search_highlight_key === key, 'indent': buffer.indent, 'channel': buffer.type === 'channel', 'channel_hash': buffer.prefix === '#', 'channel_plus': buffer.prefix === '+', 'channel_ampersand': buffer.prefix === '&', 'private': buffer.type === 'private'}" ng-repeat="(key, buffer) in (filteredBuffers = (getBuffers() | toArray:'withidx' | filter:{fullName:search} | filter:hasUnread | orderBy:predicate | getBufferQuickKeys:this))">
|
||||
<a ng-click="setActiveBuffer(buffer.id)" title="{{ buffer.fullName }}" href="#">
|
||||
<span class="badge pull-right" ng-class="{'danger': buffer.notification}" ng-if="buffer.notification || buffer.unread" ng-bind="buffer.notification || buffer.unread"></span>
|
||||
<span class="badge pull-right" ng-class="{'danger': buffer.notification}" ng-bind="buffer.notification || buffer.unread"></span>
|
||||
<span class="buffer-quick-key">{{ buffer.$quickKey }}</span>
|
||||
<span class="buffername">{{ buffer.trimmedName || buffer.fullName }}</span>
|
||||
</a>
|
||||
|
|
Loading…
Reference in a new issue