From 89392434ade79f2aeb2f6f95bbd79915770efa02 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 21 Aug 2020 11:57:38 +0200 Subject: [PATCH] render unread rooms as bold --- src/domain/session/roomlist/RoomTileViewModel.js | 4 ++++ src/ui/web/css/left-panel.css | 4 ++++ src/ui/web/session/RoomTile.js | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/domain/session/roomlist/RoomTileViewModel.js b/src/domain/session/roomlist/RoomTileViewModel.js index 56d0345f..41b7ca99 100644 --- a/src/domain/session/roomlist/RoomTileViewModel.js +++ b/src/domain/session/roomlist/RoomTileViewModel.js @@ -57,6 +57,10 @@ export class RoomTileViewModel extends ViewModel { return this._isOpen; } + get isUnread() { + return this._room.isUnread; + } + get name() { return this._room.name; } diff --git a/src/ui/web/css/left-panel.css b/src/ui/web/css/left-panel.css index 9400da4d..320bb899 100644 --- a/src/ui/web/css/left-panel.css +++ b/src/ui/web/css/left-panel.css @@ -31,6 +31,10 @@ limitations under the License. align-items: center; } +.LeftPanel .name.unread { + font-weight: 600; +} + .LeftPanel div.description { margin: 0; flex: 1 1 0; diff --git a/src/ui/web/session/RoomTile.js b/src/ui/web/session/RoomTile.js index cde53b81..798e7f91 100644 --- a/src/ui/web/session/RoomTile.js +++ b/src/ui/web/session/RoomTile.js @@ -21,7 +21,7 @@ export class RoomTile extends TemplateView { render(t, vm) { return t.li({"className": {"active": vm => vm.isOpen}}, [ 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)) ]); }