diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/user_card/user_card.js | 15 | ||||
| -rw-r--r-- | src/components/user_card/user_card.vue | 16 |
2 files changed, 29 insertions, 2 deletions
diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js index 9c931c01..015a5762 100644 --- a/src/components/user_card/user_card.js +++ b/src/components/user_card/user_card.js @@ -7,7 +7,9 @@ import { requestFollow, requestUnfollow } from '../../services/follow_manipulate import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator' export default { - props: [ 'user', 'switcher', 'selected', 'hideBio', 'rounded', 'bordered', 'allowZoomingAvatar' ], + props: [ + 'user', 'switcher', 'selected', 'hideBio', 'rounded', 'bordered', 'allowZoomingAvatar' + ], data () { return { followRequestInProgress: false, @@ -99,6 +101,12 @@ export default { ProgressButton }, methods: { + showRepeats () { + this.$store.dispatch('showReblogs', this.user.id) + }, + hideRepeats () { + this.$store.dispatch('hideReblogs', this.user.id) + }, followUser () { const store = this.$store this.followRequestInProgress = true @@ -147,7 +155,10 @@ export default { } }, userProfileLink (user) { - return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames) + 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 5b6f66e7..f465467c 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -190,6 +190,22 @@ > <i class="icon-bell-ringing-o" /> </ProgressButton> + <button + v-if="user.showing_reblogs" + class="btn btn-default" + :title="$t('user_card.hide_repeats')" + @click="hideRepeats" + > + <i class="icon-eye" /> + </button> + <button + v-if="!user.showing_reblogs" + class="btn btn-default pressed" + :title="$t('user_card.show_repeats')" + @click="showRepeats" + > + <i class="icon-eye-off" /> + </button> </div> <div> |
