Bufferlist design attempt
This commit is contained in:
parent
a87dc569aa
commit
2475ad2c61
4 changed files with 29 additions and 5 deletions
|
@ -204,7 +204,7 @@ input[type=text], input[type=password], #sendMessage, .badge {
|
|||
|
||||
#sidebar .badge {
|
||||
border-radius: 0;
|
||||
margin-right: -15px;
|
||||
margin-right: -10px;
|
||||
}
|
||||
|
||||
#sidebar ul.indented li.indent span.buffername {
|
||||
|
@ -224,7 +224,7 @@ input[type=text], input[type=password], #sendMessage, .badge {
|
|||
overflow-x: hidden;
|
||||
right: 0;
|
||||
top: 0;
|
||||
padding-top: 35px;
|
||||
padding-top: 39px;
|
||||
padding-left: 5px;
|
||||
padding-bottom: 35px;
|
||||
z-index: 2;
|
||||
|
@ -256,6 +256,7 @@ input[type=text], input[type=password], #sendMessage, .badge {
|
|||
.nav-pills > li > a {
|
||||
border-radius: 0;
|
||||
color: #ddd;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
.nav-pills > li > a:hover, .nav-pills > li > a:hover span {
|
||||
color: #222;
|
||||
|
@ -511,6 +512,24 @@ h2 span, h2 small {
|
|||
display: none;
|
||||
}
|
||||
}
|
||||
/* bold hash before channels */
|
||||
li.buffer.channel a span:last-of-type:before {
|
||||
color: #888;
|
||||
content: "#";
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
li.buffer.channel.active a span:last-of-type:before {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
li.buffer.channel.active a:hover span:last-of-type:before {
|
||||
color: #222;
|
||||
}
|
||||
|
||||
li.buffer.indent.private a {
|
||||
padding-left: 17px;
|
||||
}
|
||||
|
||||
.make-thinner {
|
||||
padding-right: -15px;
|
||||
|
|
|
@ -233,10 +233,10 @@ $ 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">
|
||||
</form>
|
||||
</li>
|
||||
<li class="buffer" ng-class="{'active': buffer.active, 'indent': buffer.indent }" ng-repeat="(key, buffer) in (filteredBuffers = (getBuffers() | toArray | filter:{fullName:search} | filter:hasUnread | orderBy:predicate))">
|
||||
<li class="buffer" ng-class="{'active': buffer.active, 'indent': buffer.indent, 'channel': buffer.type === 'channel', 'private': buffer.type === 'private'}" ng-repeat="(key, buffer) in (filteredBuffers = (getBuffers() | toArray | filter:{fullName:search} | filter:hasUnread | orderBy:predicate))">
|
||||
<a href="#" ng-click="setActiveBuffer(buffer.id)" title="{{ buffer.fullName }}">
|
||||
<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="buffername">{{ buffer.shortName || buffer.fullName }}</span>
|
||||
<span class="buffername">{{ buffer.trimmedName || buffer.fullName }}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -71,6 +71,7 @@ weechat.factory('handlers', ['$rootScope', '$log', 'models', 'plugins', 'notific
|
|||
var old = models.getBuffer(buffer);
|
||||
old.fullName = obj.full_name;
|
||||
old.shortName = obj.short_name;
|
||||
old.trimmedName = obj.short_name.replace(/^[#&+]/, '');
|
||||
};
|
||||
|
||||
var handleBufferLocalvarChanged = function(message) {
|
||||
|
@ -80,7 +81,8 @@ weechat.factory('handlers', ['$rootScope', '$log', 'models', 'plugins', 'notific
|
|||
|
||||
var localvars = obj.local_variables;
|
||||
if (old !== undefined && localvars !== undefined) {
|
||||
// Update indendation status
|
||||
// Update indentation status
|
||||
old.type = localvars.type;
|
||||
old.indent = (['channel', 'private'].indexOf(localvars.type) >= 0);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -12,6 +12,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
|
|||
// weechat properties
|
||||
var fullName = message.full_name;
|
||||
var shortName = message.short_name;
|
||||
var trimmedName = shortName.replace(/^[#&+]/, '');
|
||||
var title = message.title;
|
||||
var number = message.number;
|
||||
var pointer = message.pointers[0];
|
||||
|
@ -221,6 +222,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
|
|||
id: pointer,
|
||||
fullName: fullName,
|
||||
shortName: shortName,
|
||||
trimmedName: trimmedName,
|
||||
number: number,
|
||||
title: title,
|
||||
lines: lines,
|
||||
|
@ -238,6 +240,7 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
|
|||
getNicklistByTime: getNicklistByTime,
|
||||
serverSortKey: serverSortKey,
|
||||
indent: indent,
|
||||
type: type,
|
||||
history: history,
|
||||
addToHistory: addToHistory,
|
||||
getHistoryUp: getHistoryUp,
|
||||
|
|
Loading…
Reference in a new issue