From 07b8115a37a22b2a7d935154e8231c8a90f199d6 Mon Sep 17 00:00:00 2001 From: dave Date: Tue, 19 Mar 2019 14:36:27 -0400 Subject: [PATCH 1/2] #444 - show `remote follow` button when logged out --- src/components/follow_card/follow_card.js | 7 ++++- src/components/follow_card/follow_card.vue | 9 ++++--- src/components/remote_follow/remote_follow.js | 10 +++++++ .../remote_follow/remote_follow.vue | 26 +++++++++++++++++++ src/components/user_card/user_card.js | 4 ++- src/components/user_card/user_card.vue | 15 ++--------- 6 files changed, 53 insertions(+), 18 deletions(-) create mode 100644 src/components/remote_follow/remote_follow.js create mode 100644 src/components/remote_follow/remote_follow.vue diff --git a/src/components/follow_card/follow_card.js b/src/components/follow_card/follow_card.js index 425c9c3e..ac4e265a 100644 --- a/src/components/follow_card/follow_card.js +++ b/src/components/follow_card/follow_card.js @@ -1,4 +1,5 @@ import BasicUserCard from '../basic_user_card/basic_user_card.vue' +import RemoteFollow from '../remote_follow/remote_follow.vue' import { requestFollow, requestUnfollow } from '../../services/follow_manipulate/follow_manipulate' const FollowCard = { @@ -14,13 +15,17 @@ const FollowCard = { } }, components: { - BasicUserCard + BasicUserCard, + RemoteFollow }, computed: { isMe () { return this.$store.state.users.currentUser.id === this.user.id }, following () { return this.updated ? this.updated.following : this.user.following }, showFollow () { return !this.following || this.updated && !this.updated.following + }, + loggedIn () { + return this.$store.state.users.currentUser } }, methods: { diff --git a/src/components/follow_card/follow_card.vue b/src/components/follow_card/follow_card.vue index 6cb064eb..9bd21cfd 100644 --- a/src/components/follow_card/follow_card.vue +++ b/src/components/follow_card/follow_card.vue @@ -4,9 +4,12 @@ {{ isMe ? $t('user_card.its_you') : $t('user_card.follows_you') }} +
+ +
+ + + + + + + diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js index 43a77f45..b07da675 100644 --- a/src/components/user_card/user_card.js +++ b/src/components/user_card/user_card.js @@ -1,4 +1,5 @@ import UserAvatar from '../user_avatar/user_avatar.vue' +import RemoteFollow from '../remote_follow/remote_follow.vue' import { hex2rgb } from '../../services/color_convert/color_convert.js' import { requestFollow, requestUnfollow } from '../../services/follow_manipulate/follow_manipulate' import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator' @@ -99,7 +100,8 @@ export default { } }, components: { - UserAvatar + UserAvatar, + RemoteFollow }, methods: { followUser () { diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index 690e1bde..f4114e6e 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -84,14 +84,8 @@ -
-
- - - -
+
+
@@ -375,11 +369,6 @@ min-height: 28px; } - .remote-follow { - max-width: 220px; - min-height: 28px; - } - .follow { max-width: 220px; min-height: 28px; From 96c88b334c2bf19ed1ffc418f0603d49c5a71652 Mon Sep 17 00:00:00 2001 From: dave Date: Tue, 19 Mar 2019 14:41:50 -0400 Subject: [PATCH 2/2] #444 - remote follow clean up --- src/components/remote_follow/remote_follow.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/remote_follow/remote_follow.vue b/src/components/remote_follow/remote_follow.vue index db361e49..fb2147bd 100644 --- a/src/components/remote_follow/remote_follow.vue +++ b/src/components/remote_follow/remote_follow.vue @@ -13,8 +13,6 @@