about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/notifications/components/follow.js
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2020-09-15 18:09:08 +0200
committerThibG <thib@sitedethib.com>2020-09-17 15:22:56 +0200
commit66e9a77e36a67a5c29feb8be5b1e323b463e0468 (patch)
tree4cc37994066f53a39bd962002fe4b68e76933f94 /app/javascript/flavours/glitch/features/notifications/components/follow.js
parentae698469d0c129216580e222d6d6ca82eab4516b (diff)
Display unread marker for notifications
Diffstat (limited to 'app/javascript/flavours/glitch/features/notifications/components/follow.js')
-rw-r--r--app/javascript/flavours/glitch/features/notifications/components/follow.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/notifications/components/follow.js b/app/javascript/flavours/glitch/features/notifications/components/follow.js
index 2b71f3107..0d3162fc9 100644
--- a/app/javascript/flavours/glitch/features/notifications/components/follow.js
+++ b/app/javascript/flavours/glitch/features/notifications/components/follow.js
@@ -5,6 +5,7 @@ import PropTypes from 'prop-types';
 import { FormattedMessage } from 'react-intl';
 import ImmutablePureComponent from 'react-immutable-pure-component';
 import { HotKeys } from 'react-hotkeys';
+import classNames from 'classnames';
 
 // Our imports.
 import Permalink from 'flavours/glitch/components/permalink';
@@ -19,6 +20,7 @@ export default class NotificationFollow extends ImmutablePureComponent {
     id: PropTypes.string.isRequired,
     account: ImmutablePropTypes.map.isRequired,
     notification: ImmutablePropTypes.map.isRequired,
+    unread: PropTypes.bool,
   };
 
   handleMoveUp = () => {
@@ -59,7 +61,7 @@ export default class NotificationFollow extends ImmutablePureComponent {
   }
 
   render () {
-    const { account, notification, hidden } = this.props;
+    const { account, notification, hidden, unread } = this.props;
 
     //  Links to the display name.
     const displayName = account.get('display_name_html') || account.get('username');
@@ -76,7 +78,7 @@ export default class NotificationFollow extends ImmutablePureComponent {
     //  Renders.
     return (
       <HotKeys handlers={this.getHandlers()}>
-        <div className='notification notification-follow focusable' tabIndex='0'>
+        <div className={classNames('notification notification-follow focusable', { unread })} tabIndex='0'>
           <div className='notification__message'>
             <div className='notification__favourite-icon-wrapper'>
               <Icon fixedWidth id='user-plus' />