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": {
|
"columns": {
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"slug": "Alias"
|
"slug": "Alias",
|
||||||
|
"unblk": "Entblocken"
|
||||||
},
|
},
|
||||||
"empty": "Bislang hast du niemanden blockiert.",
|
"empty": "Bislang hast du niemanden blockiert.",
|
||||||
"how-to": "Du kannst andere Benutzer auf deren Profilseite über das Inhaltsmenü blockieren.",
|
"how-to": "Du kannst andere Benutzer auf deren Profilseite über das Inhaltsmenü blockieren.",
|
||||||
"block": "Nutzer blockieren",
|
"block": "Nutzer blockieren",
|
||||||
"unblock": "Nutzer entblocken"
|
"unblock": "Nutzer entblocken",
|
||||||
|
"unblocked": " ist wieder entblockt"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"admin": {
|
"admin": {
|
||||||
|
|||||||
@ -314,12 +314,14 @@
|
|||||||
},
|
},
|
||||||
"columns": {
|
"columns": {
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"slug": "Slug"
|
"slug": "Slug",
|
||||||
|
"unblk": "Unblock"
|
||||||
},
|
},
|
||||||
"empty": "So far, you have not blocked anybody.",
|
"empty": "So far, you have not blocked anybody.",
|
||||||
"how-to": "You can block other users on their profile page via the content menu.",
|
"how-to": "You can block other users on their profile page via the content menu.",
|
||||||
"block": "Block user",
|
"block": "Block user",
|
||||||
"unblock": "Unblock user"
|
"unblock": "Unblock user",
|
||||||
|
"unblocked": " is unblocked again"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"admin": {
|
"admin": {
|
||||||
|
|||||||
@ -56,6 +56,11 @@
|
|||||||
<b>{{ scope.row.slug | truncate(20) }}</b>
|
<b>{{ scope.row.slug | truncate(20) }}</b>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</template>
|
</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-table>
|
||||||
</ds-card>
|
</ds-card>
|
||||||
<ds-card v-else>
|
<ds-card v-else>
|
||||||
@ -74,7 +79,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { BlockedUsers } from '~/graphql/settings/BlockedUsers'
|
import { BlockedUsers, Unblock} from '~/graphql/settings/BlockedUsers'
|
||||||
import HcAvatar from '~/components/Avatar/Avatar.vue'
|
import HcAvatar from '~/components/Avatar/Avatar.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -92,12 +97,20 @@ export default {
|
|||||||
avatar: '',
|
avatar: '',
|
||||||
name: this.$t('settings.blocked-users.columns.name'),
|
name: this.$t('settings.blocked-users.columns.name'),
|
||||||
slug: this.$t('settings.blocked-users.columns.slug'),
|
slug: this.$t('settings.blocked-users.columns.slug'),
|
||||||
|
unblock: this.$t('settings.blocked-users.columns.unblock'),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
apollo: {
|
apollo: {
|
||||||
blockedUsers: { query: BlockedUsers, fetchPolicy: 'cache-and-network' },
|
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>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user