зеркало из https://github.com/nextcloud/spreed.git
Limit unread message counter to "99+"
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Родитель
c81bbec815
Коммит
ffb65b468e
|
@ -96,11 +96,24 @@
|
||||||
height: 32px;
|
height: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#app-navigation .app-navigation-entry-utils-counter span {
|
#app-navigation .app-navigation-entry-utils-counter {
|
||||||
padding: 2px 5px;
|
overflow: hidden;
|
||||||
border-radius: 10px;
|
text-align: right;
|
||||||
background-color: $color-primary;
|
font-size: 9pt;
|
||||||
color: $color-primary-text;
|
line-height: 44px;
|
||||||
|
padding: 0 12px; /* Same padding as all li > a in the app-navigation */
|
||||||
|
|
||||||
|
&.highlighted {
|
||||||
|
padding-right: 0;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
span {
|
||||||
|
padding: 2px 5px;
|
||||||
|
border-radius: 10px;
|
||||||
|
background-color: $color-primary;
|
||||||
|
color: $color-primary-text;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.public-room {
|
.public-room {
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
var ITEM_TEMPLATE = '<a class="app-navigation-entry-link" href="#{{id}}" data-token="{{token}}"><div class="avatar" data-user="{{name}}" data-user-display-name="{{displayName}}"></div> {{displayName}}</a>'+
|
var ITEM_TEMPLATE = '<a class="app-navigation-entry-link" href="#{{id}}" data-token="{{token}}"><div class="avatar" data-user="{{name}}" data-user-display-name="{{displayName}}"></div> {{displayName}}</a>'+
|
||||||
'<div class="app-navigation-entry-utils">'+
|
'<div class="app-navigation-entry-utils">'+
|
||||||
'<ul>'+
|
'<ul>'+
|
||||||
'{{#if unreadMessages}}<li class="app-navigation-entry-utils-counter"><span>{{unreadMessages}}</span></li>{{/if}}'+
|
'{{#if unreadMessages}}<li class="app-navigation-entry-utils-counter highlighted"><span>{{numUnreadMessages}}</span></li>{{/if}}'+
|
||||||
'<li class="app-navigation-entry-utils-menu-button"><button></button></li>'+
|
'<li class="app-navigation-entry-utils-menu-button"><button></button></li>'+
|
||||||
'</ul>'+
|
'</ul>'+
|
||||||
'</div>'+
|
'</div>'+
|
||||||
|
@ -103,7 +103,8 @@
|
||||||
templateContext: function() {
|
templateContext: function() {
|
||||||
return {
|
return {
|
||||||
isDeletable: (this.model.get('participantType') === 1 || this.model.get('participantType') === 2) &&
|
isDeletable: (this.model.get('participantType') === 1 || this.model.get('participantType') === 2) &&
|
||||||
(Object.keys(this.model.get('participants')).length > 1 || this.model.get('numGuests') > 0)
|
(Object.keys(this.model.get('participants')).length > 1 || this.model.get('numGuests') > 0),
|
||||||
|
numUnreadMessages: this.model.get('unreadMessages') > 99 ? '99+' : this.model.get('unreadMessages')
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onRender: function() {
|
onRender: function() {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче