This commit is contained in:
ogerly 2019-11-02 08:53:13 +01:00 committed by roschaefer
parent 958b88ceda
commit e7056dd100

View File

@ -56,11 +56,10 @@
<b>{{ scope.row.slug | truncate(20) }}</b>
</nuxt-link>
</template>
<template slot="unblock" slot-scope="scope" >
<ds-button size="small" @click="unblock(scope)"><ds-icon name="power-off" /></ds-button>
<template slot="unblock" slot-scope="scope">
<ds-button size="small" @click="unblock(scope)"><ds-icon name="power-off" /></ds-button>
</template>
</ds-table>
</ds-card>
<ds-card v-else>
@ -79,7 +78,7 @@
</template>
<script>
import { BlockedUsers, Unblock} from '~/graphql/settings/BlockedUsers'
import { BlockedUsers, Unblock } from '~/graphql/settings/BlockedUsers'
import HcAvatar from '~/components/Avatar/Avatar.vue'
export default {
@ -104,11 +103,11 @@ export default {
apollo: {
blockedUsers: { query: BlockedUsers, fetchPolicy: 'cache-and-network' },
},
methods: {
async unblock(user) {
await this.$apollo.mutate({ mutation: Unblock(), variables: { id: user.row.id } })
this.$apollo.queries.blockedUsers.refetch()
this.$toast.success(user.row.slug + " " + this.$t('settings.blocked-users.unblocked'))
methods: {
async unblock(user) {
await this.$apollo.mutate({ mutation: Unblock(), variables: { id: user.row.id } })
this.$apollo.queries.blockedUsers.refetch()
this.$toast.success(user.row.slug + ' ' + this.$t('settings.blocked-users.unblocked'))
},
},
}