mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
2106-unblock a user in the user settings
This commit is contained in:
parent
90211b878c
commit
958b88ceda
@ -313,12 +313,14 @@
|
||||
},
|
||||
"columns": {
|
||||
"name": "Name",
|
||||
"slug": "Alias"
|
||||
"slug": "Alias",
|
||||
"unblk": "Entblocken"
|
||||
},
|
||||
"empty": "Bislang hast du niemanden blockiert.",
|
||||
"how-to": "Du kannst andere Benutzer auf deren Profilseite über das Inhaltsmenü blockieren.",
|
||||
"block": "Nutzer blockieren",
|
||||
"unblock": "Nutzer entblocken"
|
||||
"unblock": "Nutzer entblocken",
|
||||
"unblocked": " ist wieder entblockt"
|
||||
}
|
||||
},
|
||||
"admin": {
|
||||
|
||||
@ -314,12 +314,14 @@
|
||||
},
|
||||
"columns": {
|
||||
"name": "Name",
|
||||
"slug": "Slug"
|
||||
"slug": "Slug",
|
||||
"unblk": "Unblock"
|
||||
},
|
||||
"empty": "So far, you have not blocked anybody.",
|
||||
"how-to": "You can block other users on their profile page via the content menu.",
|
||||
"block": "Block user",
|
||||
"unblock": "Unblock user"
|
||||
"unblock": "Unblock user",
|
||||
"unblocked": " is unblocked again"
|
||||
}
|
||||
},
|
||||
"admin": {
|
||||
|
||||
@ -56,6 +56,11 @@
|
||||
<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>
|
||||
|
||||
</ds-table>
|
||||
</ds-card>
|
||||
<ds-card v-else>
|
||||
@ -74,7 +79,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { BlockedUsers } from '~/graphql/settings/BlockedUsers'
|
||||
import { BlockedUsers, Unblock} from '~/graphql/settings/BlockedUsers'
|
||||
import HcAvatar from '~/components/Avatar/Avatar.vue'
|
||||
|
||||
export default {
|
||||
@ -92,12 +97,20 @@ export default {
|
||||
avatar: '',
|
||||
name: this.$t('settings.blocked-users.columns.name'),
|
||||
slug: this.$t('settings.blocked-users.columns.slug'),
|
||||
unblock: this.$t('settings.blocked-users.columns.unblock'),
|
||||
}
|
||||
},
|
||||
},
|
||||
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'))
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user