diff options
| author | taehoon <th.dev91@gmail.com> | 2019-03-19 04:53:11 -0400 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-05-03 11:40:05 -0400 |
| commit | 2cda9010df6192b008515b2138a2e071473bc40b (patch) | |
| tree | b753369b2c9803fa5c0cae0e70895f5d0dfae0cc /src/components/user_card | |
| parent | 0438031da44a70816716de40625541d569a49c85 (diff) | |
add user reporting modal
Diffstat (limited to 'src/components/user_card')
| -rw-r--r-- | src/components/user_card/user_card.js | 3 | ||||
| -rw-r--r-- | src/components/user_card/user_card.vue | 10 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js index 1a100de3..7c6ffa89 100644 --- a/src/components/user_card/user_card.js +++ b/src/components/user_card/user_card.js @@ -151,6 +151,9 @@ export default { }, userProfileLink (user) { return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames) + }, + reportUser () { + this.$store.dispatch('openUserReportingModal', this.user.id) } } } diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index e62b384d..2d02ca03 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -99,8 +99,14 @@ </button> </span> </div> - <ModerationTools :user='user' v-if='loggedIn.role === "admin"'> - </ModerationTools> + <div class='block' v-if='isOtherUser && loggedIn'> + <span> + <button @click="reportUser"> + {{ $t('user_card.report') }} + </button> + </span> + </div> + <ModerationTools :user='user' v-if='loggedIn.role === "admin"'/> </div> </div> </div> |
