From d6a39b3e0959dc40b21ebd0bf5775d172914b073 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 11 Sep 2020 13:04:31 -0500 Subject: [PATCH 1/3] Hovercard: put hovercard on chat window --- .../features/chats/components/chat_window.js | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/app/soapbox/features/chats/components/chat_window.js b/app/soapbox/features/chats/components/chat_window.js index acc5c2e8e..bb1a6346b 100644 --- a/app/soapbox/features/chats/components/chat_window.js +++ b/app/soapbox/features/chats/components/chat_window.js @@ -14,6 +14,7 @@ import { } from 'soapbox/actions/chats'; import ChatBox from './chat_box'; import { shortNumberFormat } from 'soapbox/utils/numbers'; +import HoverRefWrapper from 'soapbox/components/hover_ref_wrapper'; const mapStateToProps = (state, { pane }) => ({ me: state.get('me'), @@ -79,13 +80,24 @@ class ChatWindow extends ImmutablePureComponent { const right = (285 * (idx + 1)) + 20; const unreadCount = chat.get('unread'); + const unreadIcon = ( + + {shortNumberFormat(unreadCount)} + + ); + + const avatar = ( + + + + + + ); + return (
- {unreadCount > 0 - ? {shortNumberFormat(unreadCount)} - : - } + {unreadCount > 0 ? unreadIcon : avatar } From ec491add236b044ad0429e2f5b8a122e0be2f468 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 11 Sep 2020 13:04:45 -0500 Subject: [PATCH 2/3] UserPanel: only show stats when they're available --- app/soapbox/features/ui/components/user_panel.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/soapbox/features/ui/components/user_panel.js b/app/soapbox/features/ui/components/user_panel.js index 1ba4e3efc..411b9b70b 100644 --- a/app/soapbox/features/ui/components/user_panel.js +++ b/app/soapbox/features/ui/components/user_panel.js @@ -56,26 +56,26 @@ class UserPanel extends ImmutablePureComponent {
-
+ {account.get('statuses_count') &&
{shortNumberFormat(account.get('statuses_count'))} -
+
} -
+ {account.get('followers_count') &&
{shortNumberFormat(account.get('followers_count'))} -
+
} -
+ {account.get('following_count') &&
{shortNumberFormat(account.get('following_count'))} -
+
}
From 40937b9fdc2890d1f28632d1a62de09b03820057 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 11 Sep 2020 13:09:39 -0500 Subject: [PATCH 3/3] Chats: allow clicking recipient in chatroom --- app/soapbox/features/chats/chat_room.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/soapbox/features/chats/chat_room.js b/app/soapbox/features/chats/chat_room.js index f3e81cc12..a9f0ccd5d 100644 --- a/app/soapbox/features/chats/chat_room.js +++ b/app/soapbox/features/chats/chat_room.js @@ -3,6 +3,7 @@ import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { injectIntl } from 'react-intl'; +import { Link } from 'react-router-dom'; import ImmutablePureComponent from 'react-immutable-pure-component'; import Avatar from 'soapbox/components/avatar'; import { acctFull } from 'soapbox/utils/accounts'; @@ -75,12 +76,12 @@ class ChatRoom extends ImmutablePureComponent {
-
+
@{acctFull(account)}
-
+