Skip to content

Commit 5b28780

Browse files
committed
Add Block/Unblock button next to Author
on blacklist settings. This button was requested by a couple of users.
1 parent ea189f7 commit 5b28780

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

components/Author/Author.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
<template>
22
<div :class="{ disabled: disableLink, 'is-owner': isOwner, mask: maskUser }"
3-
class="media hc__author"
4-
@click="showProfile">
5-
<div class="media-left" v-if="showAvatar">
3+
class="media hc__author">
4+
<div class="media-left" v-if="showAvatar" @click="showProfile">
65
<hc-avatar
76
:user="getUser"
87
:showOnlineStatus="true"
98
:imageKey="imageKey" />
109
</div>
11-
<div class="media-content" v-if="showText">
10+
<div class="media-content" @click="showProfile" v-if="showText">
1211
<p class="title" v-if="!user">
1312
{{ $t('component.contribution.creatorUnknown') }}
1413
</p>
@@ -20,6 +19,8 @@
2019
<hc-relative-date-time :dateTime="createdAt"></hc-relative-date-time>
2120
</p>
2221
</div>
22+
<slot>
23+
</slot>
2324
</div>
2425
</template>
2526

pages/auth/settings/blacklist.vue

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,26 @@
66
<p class="subtitle is-6">{{ $t('auth.settings.blacklistSubtitle') }}</p>
77
<hc-box :isLoading="isLoading">
88
<author
9-
v-for="(user, index) in blacklistedUsers"
10-
:key="user._id"
11-
:user="user"
12-
/>
13-
</hc-box>
9+
v-for="(user, index) in blacklistedUsers"
10+
:key="user._id"
11+
:user="user">
12+
<div class="media-right">
13+
<hc-block-button :foreignEntity="user" :isFollowing="false"/>
14+
</div>
15+
</author>
16+
</hc-box>
1417
</div>
1518
</template>
1619

1720
<script>
1821
import Author from '~/components/Author/Author.vue'
1922
import Box from '~/components/Global/Layout/Box/Box.vue'
23+
import BlockButton from '~/components/Global/Elements/BlockButton/BlockButton'
2024
import { mapGetters } from 'vuex'
2125
2226
export default {
2327
components: {
28+
'hc-block-button': BlockButton,
2429
'author': Author,
2530
'hc-box': Box
2631
},

store/services/usersettings.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ let servicePlugin = (feathersClient) => {
1616
},
1717
isPending: (state) => {
1818
return (
19-
state.current ||
2019
state.isFindPending ||
2120
state.isGetPending ||
2221
state.isCreatePending ||

0 commit comments

Comments
 (0)