render unread rooms as bold

This commit is contained in:
Bruno Windels 2020-08-21 11:57:38 +02:00
parent 7458465ef6
commit 89392434ad
3 changed files with 9 additions and 1 deletions

View File

@ -57,6 +57,10 @@ export class RoomTileViewModel extends ViewModel {
return this._isOpen; return this._isOpen;
} }
get isUnread() {
return this._room.isUnread;
}
get name() { get name() {
return this._room.name; return this._room.name;
} }

View File

@ -31,6 +31,10 @@ limitations under the License.
align-items: center; align-items: center;
} }
.LeftPanel .name.unread {
font-weight: 600;
}
.LeftPanel div.description { .LeftPanel div.description {
margin: 0; margin: 0;
flex: 1 1 0; flex: 1 1 0;

View File

@ -21,7 +21,7 @@ export class RoomTile extends TemplateView {
render(t, vm) { render(t, vm) {
return t.li({"className": {"active": vm => vm.isOpen}}, [ return t.li({"className": {"active": vm => vm.isOpen}}, [
renderAvatar(t, vm, 32), renderAvatar(t, vm, 32),
t.div({className: "description"}, t.div({className: "name"}, vm => vm.name)) t.div({className: "description"}, t.div({className: {"name": true, unread: vm => vm.isUnread}}, vm => vm.name))
]); ]);
} }