diff --git a/app/javascript/mastodon/features/account/components/header.jsx b/app/javascript/mastodon/features/account/components/header.jsx
index 29b46cb43d..ab9526f66a 100644
--- a/app/javascript/mastodon/features/account/components/header.jsx
+++ b/app/javascript/mastodon/features/account/components/header.jsx
@@ -35,6 +35,8 @@ import FollowRequestNoteContainer from '../containers/follow_request_note_contai
const messages = defineMessages({
unfollow: { id: 'account.unfollow', defaultMessage: 'Unfollow' },
follow: { id: 'account.follow', defaultMessage: 'Follow' },
+ followBack: { id: 'account.follow_back', defaultMessage: 'Follow back' },
+ mutual: { id: 'account.mutual', defaultMessage: 'Mutual' },
cancel_follow_request: { id: 'account.cancel_follow_request', defaultMessage: 'Withdraw follow request' },
requested: { id: 'account.requested', defaultMessage: 'Awaiting approval. Click to cancel follow request' },
unblock: { id: 'account.unblock', defaultMessage: 'Unblock @{name}' },
@@ -82,6 +84,18 @@ const titleFromAccount = account => {
return `${prefix} (@${acct})`;
};
+const messageForFollowButton = relationship => {
+ if (relationship.get('following') && relationship.get('followed_by')) {
+ return messages.mutual;
+ } else if (!relationship.get('following') && relationship.get('followed_by')) {
+ return messages.followBack;
+ } else if (relationship.get('following')) {
+ return messages.unfollow;
+ } else {
+ return messages.follow;
+ }
+};
+
const dateFormatOptions = {
month: 'short',
day: 'numeric',
@@ -253,9 +267,7 @@ class Header extends ImmutablePureComponent {
let info = [];
let menu = [];
- if (me !== account.get('id') && account.getIn(['relationship', 'followed_by'])) {
- info.push();
- } else if (me !== account.get('id') && account.getIn(['relationship', 'blocking'])) {
+ if (me !== account.get('id') && account.getIn(['relationship', 'blocking'])) {
info.push();
}
@@ -281,7 +293,7 @@ class Header extends ImmutablePureComponent {
} else if (account.getIn(['relationship', 'requested'])) {
actionBtn = ;
} else if (!account.getIn(['relationship', 'blocking'])) {
- actionBtn = ;
+ actionBtn = ;
} else if (account.getIn(['relationship', 'blocking'])) {
actionBtn = ;
}
diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json
index 05d7d16564..be7209d04a 100644
--- a/app/javascript/mastodon/locales/en.json
+++ b/app/javascript/mastodon/locales/en.json
@@ -32,13 +32,13 @@
"account.featured_tags.last_status_never": "No posts",
"account.featured_tags.title": "{name}'s featured hashtags",
"account.follow": "Follow",
+ "account.follow_back": "Follow back",
"account.followers": "Followers",
"account.followers.empty": "No one follows this user yet.",
"account.followers_counter": "{count, plural, one {{counter} Follower} other {{counter} Followers}}",
"account.following": "Following",
"account.following_counter": "{count, plural, one {{counter} Following} other {{counter} Following}}",
"account.follows.empty": "This user doesn't follow anyone yet.",
- "account.follows_you": "Follows you",
"account.go_to_profile": "Go to profile",
"account.hide_reblogs": "Hide boosts from @{name}",
"account.in_memoriam": "In Memoriam.",
@@ -53,6 +53,7 @@
"account.mute_notifications_short": "Mute notifications",
"account.mute_short": "Mute",
"account.muted": "Muted",
+ "account.mutual": "Mutual",
"account.no_bio": "No description provided.",
"account.open_original_page": "Open original page",
"account.posts": "Posts",