From 943ee54c98d3aed936c87ab528bc080b87f92b57 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 7 Oct 2021 21:39:03 -0500 Subject: [PATCH] Profile: restore "extra" links on desktop --- .../features/account/components/header.js | 39 ++++++++++++++++++- app/styles/components/account-header.scss | 2 + 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/app/soapbox/features/account/components/header.js b/app/soapbox/features/account/components/header.js index 2b8110d95..4dc7fad41 100644 --- a/app/soapbox/features/account/components/header.js +++ b/app/soapbox/features/account/components/header.js @@ -17,6 +17,8 @@ import { } from 'soapbox/utils/accounts'; import classNames from 'classnames'; import Avatar from 'soapbox/components/avatar'; +import { shortNumberFormat } from 'soapbox/utils/numbers'; +import { NavLink } from 'react-router-dom'; import DropdownMenuContainer from 'soapbox/containers/dropdown_menu_container'; import BundleContainer from 'soapbox/features/ui/containers/bundle_container'; import { ProfileInfoPanel } from 'soapbox/features/ui/util/async-components'; @@ -295,7 +297,7 @@ class Header extends ImmutablePureComponent { } render() { - const { account, username, me, features } = this.props; + const { account, intl, username, me, features } = this.props; const { isSmallScreen } = this.state; if (!account) { @@ -318,6 +320,7 @@ class Header extends ImmutablePureComponent { ); } + const ownAccount = account.get('id') === me; const info = this.makeInfo(); const menu = this.makeMenu(); @@ -349,6 +352,40 @@ class Header extends ImmutablePureComponent { +
+ + + {shortNumberFormat(account.get('statuses_count'))} + + + + {(ownAccount || !account.getIn(['pleroma', 'hide_follows'], false)) && + {account.getIn(['pleroma', 'hide_follows_count'], false) ? : {shortNumberFormat(account.get('following_count'))}} + + } + + {(ownAccount || !account.getIn(['pleroma', 'hide_followers'], false)) && + {account.getIn(['pleroma', 'hide_followers_count'], false) ? : {shortNumberFormat(account.get('followers_count'))}} + + } + + {(ownAccount || !account.getIn(['pleroma', 'hide_favorites'], true)) && + { /* : TODO : shortNumberFormat(account.get('favourite_count')) */ } + + + } + + {ownAccount && + + { /* : TODO : shortNumberFormat(account.get('pinned_count')) */ } + + + + } +
+ {isSmallScreen && (
diff --git a/app/styles/components/account-header.scss b/app/styles/components/account-header.scss index 12ca0146c..e84ea8915 100644 --- a/app/styles/components/account-header.scss +++ b/app/styles/components/account-header.scss @@ -219,9 +219,11 @@ display: flex; font-size: 14px; color: var(--primary-text-color--faint); + @media screen and (max-width: 895px) { justify-content: center; flex-wrap: wrap; + display: none; } a {