aboutsummaryrefslogtreecommitdiff
path: root/src/components/follow_button
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2022-01-19 13:09:49 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2022-01-19 13:09:49 +0000
commit6509542dbdb22d7df0d6994fa6af9aaa4df1d700 (patch)
tree743958144a924fea02dd2b78a0f6904ad2a7165e /src/components/follow_button
parent756f7bf7c2ee1beb7b43227271942130fd03c7cb (diff)
parent2ac78219eee4f123c398cedb0709cc32c84740e0 (diff)
Merge branch 'fixes_for_deactivated_profile' into 'develop'
Improve the user card for deactivated users See merge request pleroma/pleroma-fe!1417
Diffstat (limited to 'src/components/follow_button')
-rw-r--r--src/components/follow_button/follow_button.js5
-rw-r--r--src/components/follow_button/follow_button.vue2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/components/follow_button/follow_button.js b/src/components/follow_button/follow_button.js
index df42692b..3edbcb86 100644
--- a/src/components/follow_button/follow_button.js
+++ b/src/components/follow_button/follow_button.js
@@ -1,6 +1,6 @@
import { requestFollow, requestUnfollow } from '../../services/follow_manipulate/follow_manipulate'
export default {
- props: ['relationship', 'labelFollowing', 'buttonClass'],
+ props: ['relationship', 'user', 'labelFollowing', 'buttonClass'],
data () {
return {
inProgress: false
@@ -29,6 +29,9 @@ export default {
} else {
return this.$t('user_card.follow')
}
+ },
+ disabled () {
+ return this.inProgress || this.user.deactivated
}
},
methods: {
diff --git a/src/components/follow_button/follow_button.vue b/src/components/follow_button/follow_button.vue
index 7f85f1d7..965d5256 100644
--- a/src/components/follow_button/follow_button.vue
+++ b/src/components/follow_button/follow_button.vue
@@ -2,7 +2,7 @@
<button
class="btn button-default follow-button"
:class="{ toggled: isPressed }"
- :disabled="inProgress"
+ :disabled="disabled"
:title="title"
@click="onClick"
>