From 3ca035f9aad71101ffc80b9cd8ff9d3ad2368e68 Mon Sep 17 00:00:00 2001 From: David Wheatley Date: Sun, 2 May 2021 17:13:04 +0100 Subject: [PATCH] Revamp notifications stylesheet (grid and flex) (#2822) --- js/src/forum/components/Notification.js | 31 ++- js/src/forum/components/NotificationList.js | 24 +- .../forum/components/NotificationsDropdown.js | 10 +- less/forum/NotificationList.less | 244 +++++++++++------- 4 files changed, 186 insertions(+), 123 deletions(-) diff --git a/js/src/forum/components/Notification.js b/js/src/forum/components/Notification.js index e9ce7092c..32ba8bb6c 100644 --- a/js/src/forum/components/Notification.js +++ b/js/src/forum/components/Notification.js @@ -4,6 +4,7 @@ import icon from '../../common/helpers/icon'; import humanTime from '../../common/helpers/humanTime'; import Button from '../../common/components/Button'; import Link from '../../common/components/Link'; +import classList from '../../common/utils/classList'; /** * The `Notification` component abstract displays a single notification. @@ -22,27 +23,31 @@ export default class Notification extends Component { return ( - {!notification.isRead() && - Button.component({ - className: 'Notification-action Button Button--icon Button--link', - icon: 'fas fa-check', - title: app.translator.trans('core.forum.notifications.mark_as_read_tooltip'), - onclick: (e) => { + {avatar(notification.fromUser())} + {icon(this.icon(), { className: 'Notification-icon' })} + + {this.content()} + + {humanTime(notification.createdAt())} + + {!notification.isRead() && ( +