From 9819c9f801128d07374b0703b482bdb83a672297 Mon Sep 17 00:00:00 2001 From: Jonathan Baird Date: Fri, 27 Mar 2020 11:35:03 -0600 Subject: add a notification drawer like trello --- client/components/notifications/notificationsDrawer.jade | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 client/components/notifications/notificationsDrawer.jade (limited to 'client/components/notifications/notificationsDrawer.jade') diff --git a/client/components/notifications/notificationsDrawer.jade b/client/components/notifications/notificationsDrawer.jade new file mode 100644 index 00000000..67fc6e65 --- /dev/null +++ b/client/components/notifications/notificationsDrawer.jade @@ -0,0 +1,16 @@ +template(name='notificationsDrawer') + section#notifications-drawer(class="{{#if $.Session.get 'showReadNotifications'}}show-read{{/if}}") + .header + if $.Session.get 'showReadNotifications' + a.toggle-read Filter by Unread + else + a.toggle-read View All + h5 Notifications + if($gt unreadNotifications 0) + |(#{unreadNotifications}) + a.fa.fa-times-thin.close + ul.notifications + each transformedProfile.notifications + +notification(activityData=activity index=dbIndex read=read) + if($gt unreadNotifications 0) + a.all-read Mark all as read -- cgit v1.2.3-1-g7c22 From f4d0791c6c1051c90d268484dab03c0ea5a5a533 Mon Sep 17 00:00:00 2001 From: Jonathan Baird Date: Wed, 1 Apr 2020 14:50:31 -0600 Subject: add correct i18n for notifications menu --- client/components/notifications/notificationsDrawer.jade | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'client/components/notifications/notificationsDrawer.jade') diff --git a/client/components/notifications/notificationsDrawer.jade b/client/components/notifications/notificationsDrawer.jade index 67fc6e65..01117009 100644 --- a/client/components/notifications/notificationsDrawer.jade +++ b/client/components/notifications/notificationsDrawer.jade @@ -2,10 +2,10 @@ template(name='notificationsDrawer') section#notifications-drawer(class="{{#if $.Session.get 'showReadNotifications'}}show-read{{/if}}") .header if $.Session.get 'showReadNotifications' - a.toggle-read Filter by Unread + a.toggle-read {{_ 'filter-by-unread'}} else - a.toggle-read View All - h5 Notifications + a.toggle-read {{_ 'view-all'}} + h5 {{_ 'notifications'}} if($gt unreadNotifications 0) |(#{unreadNotifications}) a.fa.fa-times-thin.close @@ -13,4 +13,4 @@ template(name='notificationsDrawer') each transformedProfile.notifications +notification(activityData=activity index=dbIndex read=read) if($gt unreadNotifications 0) - a.all-read Mark all as read + a.all-read {{_ 'mark-all-as-read'}} -- cgit v1.2.3-1-g7c22 From a182dde11ff4f1ab8cd01a04e1e26affda5d8a3b Mon Sep 17 00:00:00 2001 From: Jonathan Baird Date: Wed, 8 Apr 2020 13:14:29 -0600 Subject: add a "remove all read" button to notification menu --- client/components/notifications/notificationsDrawer.jade | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'client/components/notifications/notificationsDrawer.jade') diff --git a/client/components/notifications/notificationsDrawer.jade b/client/components/notifications/notificationsDrawer.jade index 01117009..fee6aef6 100644 --- a/client/components/notifications/notificationsDrawer.jade +++ b/client/components/notifications/notificationsDrawer.jade @@ -14,3 +14,7 @@ template(name='notificationsDrawer') +notification(activityData=activity index=dbIndex read=read) if($gt unreadNotifications 0) a.all-read {{_ 'mark-all-as-read'}} + if ($and ($.Session.get 'showReadNotifications') ($gt readNotifications 0)) + a.remove-read + i.fa.fa-trash + | {{_ 'remove-all-read'}} -- cgit v1.2.3-1-g7c22