forked from AkkomaGang/admin-fe
AdminAPI: change from confirmation_pending to is_confirmed
This commit is contained in:
parent
0e36395a3e
commit
4c72ff4625
5 changed files with 7 additions and 7 deletions
|
@ -43,7 +43,7 @@ export function getUserInfo(token, authHost) {
|
||||||
'statuses_count': 0,
|
'statuses_count': 0,
|
||||||
'cover_photo': '',
|
'cover_photo': '',
|
||||||
'hide_follows': false,
|
'hide_follows': false,
|
||||||
'pleroma': { 'confirmation_pending': false, 'deactivated': false, 'tags': ['force_nsfw'], 'is_admin': true },
|
'pleroma': { 'is_confirmed': true, 'deactivated': false, 'tags': ['force_nsfw'], 'is_admin': true },
|
||||||
'profile_image_url_original': '',
|
'profile_image_url_original': '',
|
||||||
'created_at': 'Fri Mar 01 15:15:19 +0000 2019',
|
'created_at': 'Fri Mar 01 15:15:19 +0000 2019',
|
||||||
'fields': [],
|
'fields': [],
|
||||||
|
|
|
@ -149,7 +149,7 @@ const users = {
|
||||||
},
|
},
|
||||||
async ConfirmUsersEmail({ dispatch, getters }, { users, _userId, _statusId }) {
|
async ConfirmUsersEmail({ dispatch, getters }, { users, _userId, _statusId }) {
|
||||||
const updatedUsers = users.map(user => {
|
const updatedUsers = users.map(user => {
|
||||||
return { ...user, confirmation_pending: false }
|
return { ...user, is_confirmed: true }
|
||||||
})
|
})
|
||||||
const nicknames = users.map(user => user.nickname)
|
const nicknames = users.map(user => user.nickname)
|
||||||
const callApiFn = async() => await confirmUserEmail(nicknames, getters.authHost, getters.token)
|
const callApiFn = async() => await confirmUserEmail(nicknames, getters.authHost, getters.token)
|
||||||
|
|
|
@ -57,13 +57,13 @@
|
||||||
{{ $t('users.rejectAccount') }}
|
{{ $t('users.rejectAccount') }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
v-if="user.local && user.confirmation_pending"
|
v-if="user.local && !user.is_confirmed"
|
||||||
divided
|
divided
|
||||||
@click.native="handleEmailConfirmation(user)">
|
@click.native="handleEmailConfirmation(user)">
|
||||||
{{ $t('users.confirmAccount') }}
|
{{ $t('users.confirmAccount') }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
v-if="user.local && user.confirmation_pending"
|
v-if="user.local && !user.is_confirmed"
|
||||||
@click.native="handleConfirmationResend(user)">
|
@click.native="handleConfirmationResend(user)">
|
||||||
{{ $t('users.resendConfirmation') }}
|
{{ $t('users.resendConfirmation') }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
|
|
|
@ -244,13 +244,13 @@ export default {
|
||||||
applyAction(filtered, approveAccountFn)
|
applyAction(filtered, approveAccountFn)
|
||||||
},
|
},
|
||||||
confirmAccounts: () => {
|
confirmAccounts: () => {
|
||||||
const filtered = this.selectedUsers.filter(user => this.isLocalUser(user) && user.confirmation_pending)
|
const filtered = this.selectedUsers.filter(user => this.isLocalUser(user) && !user.is_confirmed)
|
||||||
const confirmAccountFn = async(users) => await this.$store.dispatch('ConfirmUsersEmail', { users })
|
const confirmAccountFn = async(users) => await this.$store.dispatch('ConfirmUsersEmail', { users })
|
||||||
|
|
||||||
applyAction(filtered, confirmAccountFn)
|
applyAction(filtered, confirmAccountFn)
|
||||||
},
|
},
|
||||||
resendConfirmation: () => {
|
resendConfirmation: () => {
|
||||||
const filtered = this.selectedUsers.filter(user => this.isLocalUser(user) && user.confirmation_pending)
|
const filtered = this.selectedUsers.filter(user => this.isLocalUser(user) && !user.is_confirmed)
|
||||||
const resendConfirmationFn = async(users) => await this.$store.dispatch('ResendConfirmationEmail', users)
|
const resendConfirmationFn = async(users) => await this.$store.dispatch('ResendConfirmationEmail', users)
|
||||||
|
|
||||||
applyAction(filtered, resendConfirmationFn)
|
applyAction(filtered, resendConfirmationFn)
|
||||||
|
|
|
@ -77,7 +77,7 @@
|
||||||
<span>{{ isDesktop ? $t('users.moderator') : getFirstLetter($t('users.moderator')) }}</span>
|
<span>{{ isDesktop ? $t('users.moderator') : getFirstLetter($t('users.moderator')) }}</span>
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tooltip :content="$t('users.unconfirmedEmail')" effect="dark">
|
<el-tooltip :content="$t('users.unconfirmedEmail')" effect="dark">
|
||||||
<el-tag v-if="scope.row.confirmation_pending" type="info">
|
<el-tag v-if="!scope.row.is_confirmed" type="info">
|
||||||
{{ isDesktop ? $t('users.unconfirmed') : getFirstLetter($t('users.unconfirmed')) }}
|
{{ isDesktop ? $t('users.unconfirmed') : getFirstLetter($t('users.unconfirmed')) }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
Loading…
Reference in a new issue