diff options
| author | lambda <pleromagit@rogerbraun.net> | 2018-06-12 16:57:18 +0000 |
|---|---|---|
| committer | lambda <pleromagit@rogerbraun.net> | 2018-06-12 16:57:18 +0000 |
| commit | 6ea5cfe71ee9ae5669c44f154b7ca5dae1211551 (patch) | |
| tree | 5fafbd876eb22501f1753739624d4e1676122d7e /src/components/user_card | |
| parent | 2330170d2305b664f623b9fe8b46d075086b13b5 (diff) | |
| parent | d7d787b84cb8e36ad7f622054808f0e66c496309 (diff) | |
Merge branch 'feature/locked-accounts' into 'develop'
Feature/locked accounts
See merge request pleroma/pleroma-fe!274
Diffstat (limited to 'src/components/user_card')
| -rw-r--r-- | src/components/user_card/user_card.js | 11 | ||||
| -rw-r--r-- | src/components/user_card/user_card.vue | 11 |
2 files changed, 21 insertions, 1 deletions
diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js index a7a871c3..a019627a 100644 --- a/src/components/user_card/user_card.js +++ b/src/components/user_card/user_card.js @@ -3,7 +3,8 @@ import UserCardContent from '../user_card_content/user_card_content.vue' const UserCard = { props: [ 'user', - 'showFollows' + 'showFollows', + 'showApproval' ], data () { return { @@ -16,6 +17,14 @@ const UserCard = { methods: { toggleUserExpanded () { this.userExpanded = !this.userExpanded + }, + approveUser () { + this.$store.state.api.backendInteractor.approveUser(this.user.id) + this.$store.dispatch('removeFollowRequest', this.user) + }, + denyUser () { + this.$store.state.api.backendInteractor.denyUser(this.user.id) + this.$store.dispatch('removeFollowRequest', this.user) } } } diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index 51d6965f..6478a65f 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -15,6 +15,10 @@ </div> <a :href="user.statusnet_profile_url" target="blank"><div class="user-screen-name">@{{ user.screen_name }}</div></a> </div> + <div class="approval" v-if="showApproval"> + <button class="btn btn-default" @click="approveUser">{{ $t('user_card.approve') }}</button> + <button class="btn btn-default" @click="denyUser">{{ $t('user_card.deny') }}</button> + </div> </div> </template> @@ -75,4 +79,11 @@ margin-bottom: 0; } } + +.approval { + button { + width: 100%; + margin-bottom: 0.5em; + } +} </style> |
