Merge pull request #837 from glowing-bear/buffer-unread-class
Move unread class to buffer <li> instead of ng-if on badge
This commit is contained in:
commit
e6f50d5ed7
@ -216,7 +216,13 @@ input[type=text], input[type=password], #sendMessage {
|
|||||||
display:block!important;
|
display:block!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidebar .badge {
|
|
||||||
|
#sidebar .buffer .badge {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar .buffer.unread .badge, #sidebar .buffer.notification .badge {
|
||||||
|
display: inline-block;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
margin-right: -10px;
|
margin-right: -10px;
|
||||||
padding: 4px 7px;
|
padding: 4px 7px;
|
||||||
|
14
index.html
14
index.html
@ -271,9 +271,19 @@ $ 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">
|
<input class="form-control favorite-font" type="text" id="bufferFilter" ng-model="search" ng-keydown="handleSearchBoxKey($event)" placeholder="Search" autocomplete="off">
|
||||||
</form>
|
</form>
|
||||||
</li>
|
</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.unread,
|
||||||
|
'notification': buffer.notification,
|
||||||
|
'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="#">
|
<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="buffer-quick-key">{{ buffer.$quickKey }}</span>
|
||||||
<span class="buffername">{{ buffer.trimmedName || buffer.fullName }}</span>
|
<span class="buffername">{{ buffer.trimmedName || buffer.fullName }}</span>
|
||||||
</a>
|
</a>
|
||||||
|
Loading…
Reference in New Issue
Block a user