forked from AkkomaGang/admin-fe
Merge branch 'api/confirmation_pending' into 'develop'
AdminAPI: change from confirmation_pending to is_confirmed See merge request pleroma/admin-fe!191
This commit is contained in:
commit
d4c7989f05
8 changed files with 21 additions and 19 deletions
|
@ -15,8 +15,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
- Filter users by actor type: Person, Bot or Application
|
||||
- Add ability to configure Media Preview Proxy, User Backup, Websocket based federation and Pleroma.Web.Endpoint.MetricsExporter settings
|
||||
- Mobile and Tablet UI for Single Report show page
|
||||
|
||||
### Changed
|
||||
|
||||
- *Breaking*: AdminAPI changed User field `confirmation_pending` to `is_confirmed`
|
||||
- Hide Tag actions on Users tab if MRF TagPolicy is disabled. Add ability to enable TagPolicy from Moderation menu
|
||||
- Move `:restrict_unauthenticated` settings from Authentication tab to Instance tab
|
||||
- Replace regular inputs with textareas for setting welcome messages in the Settings section
|
||||
|
|
|
@ -44,7 +44,7 @@ export const userChats = [
|
|||
accepts_chat_messages: true,
|
||||
ap_id: 'http://localhost:4000/users/test10',
|
||||
background_image: null,
|
||||
confirmation_pending: false,
|
||||
is_confirmed: true,
|
||||
favicon: null,
|
||||
hide_favorites: true,
|
||||
hide_followers: false,
|
||||
|
@ -99,7 +99,7 @@ export const userChats = [
|
|||
accepts_chat_messages: true,
|
||||
ap_id: 'https://localhost/users/mk',
|
||||
background_image: null,
|
||||
confirmation_pending: false,
|
||||
is_confirmed: true,
|
||||
favicon: null,
|
||||
hide_favorites: true,
|
||||
hide_followers: false,
|
||||
|
@ -168,7 +168,7 @@ export const userChats = [
|
|||
accepts_chat_messages: true,
|
||||
ap_id: 'http://localhost:4000/users/user2',
|
||||
background_image: null,
|
||||
confirmation_pending: true,
|
||||
is_confirmed: false,
|
||||
favicon: null,
|
||||
hide_favorites: true,
|
||||
hide_followers: false,
|
||||
|
@ -222,7 +222,7 @@ export const userChats = [
|
|||
accepts_chat_messages: true,
|
||||
ap_id: 'https://localhost/users/mk',
|
||||
background_image: null,
|
||||
confirmation_pending: false,
|
||||
is_confirmed: true,
|
||||
favicon: null,
|
||||
hide_favorites: true,
|
||||
hide_followers: false,
|
||||
|
@ -286,7 +286,7 @@ export const userChats = [
|
|||
accepts_chat_messages: true,
|
||||
ap_id: 'https://localhost/users/mk',
|
||||
background_image: null,
|
||||
confirmation_pending: false,
|
||||
is_confirmed: true,
|
||||
favicon: null,
|
||||
hide_favorites: true,
|
||||
hide_followers: false,
|
||||
|
@ -344,7 +344,7 @@ export const userChats = [
|
|||
accepts_chat_messages: true,
|
||||
ap_id: 'https://localhost/users/mk',
|
||||
background_image: null,
|
||||
confirmation_pending: false,
|
||||
is_confirmed: true,
|
||||
favicon: null,
|
||||
hide_favorites: true,
|
||||
hide_followers: false,
|
||||
|
|
|
@ -43,7 +43,7 @@ export function getUserInfo(token, authHost) {
|
|||
'statuses_count': 0,
|
||||
'cover_photo': '',
|
||||
'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': '',
|
||||
'created_at': 'Fri Mar 01 15:15:19 +0000 2019',
|
||||
'fields': [],
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import userChats from './chat'
|
||||
|
||||
export let users = [
|
||||
{ active: true, approval_pending: false, deactivated: false, id: '2', nickname: 'allis', local: true, external: false, roles: { admin: true, moderator: false }, tags: [], actor_type: 'Person' },
|
||||
{ active: true, approval_pending: false, deactivated: false, id: '10', nickname: 'bob', local: true, external: false, roles: { admin: false, moderator: false }, tags: ['mrf_tag:sandbox'], actor_type: 'Person' },
|
||||
{ active: true, approval_pending: true, deactivated: false, id: '567', nickname: 'ded', local: false, external: true, roles: { admin: false, moderator: false }, tags: [], actor_type: 'Person' },
|
||||
{ active: false, approval_pending: false, deactivated: true, id: 'abc', nickname: 'john', local: true, external: false, roles: { admin: false, moderator: false }, tags: ['mrf_tag:media-strip'], actor_type: 'Person' },
|
||||
{ active: true, approval_pending: true, deactivated: false, id: '100', nickname: 'sally', local: true, external: false, roles: { admin: false, moderator: false }, tags: [], actor_type: 'Service' },
|
||||
{ active: true, approval_pending: true, deactivated: false, id: '123', nickname: 'bot', local: true, external: false, roles: { admin: false, moderator: false }, tags: [], actor_type: 'Application' }
|
||||
{ active: true, is_confirmed: true, approval_pending: false, deactivated: false, id: '2', nickname: 'allis', local: true, external: false, roles: { admin: true, moderator: false }, tags: [], actor_type: 'Person' },
|
||||
{ active: true, is_confirmed: true, approval_pending: false, deactivated: false, id: '10', nickname: 'bob', local: true, external: false, roles: { admin: false, moderator: false }, tags: ['mrf_tag:sandbox'], actor_type: 'Person' },
|
||||
{ active: true, is_confirmed: true, approval_pending: true, deactivated: false, id: '567', nickname: 'ded', local: false, external: true, roles: { admin: false, moderator: false }, tags: [], actor_type: 'Person' },
|
||||
{ active: false, is_confirmed: true, approval_pending: false, deactivated: true, id: 'abc', nickname: 'john', local: true, external: false, roles: { admin: false, moderator: false }, tags: ['mrf_tag:media-strip'], actor_type: 'Person' },
|
||||
{ active: true, is_confirmed: true, approval_pending: true, deactivated: false, id: '100', nickname: 'sally', local: true, external: false, roles: { admin: false, moderator: false }, tags: [], actor_type: 'Service' },
|
||||
{ active: true, is_confirmed: true, approval_pending: true, deactivated: false, id: '123', nickname: 'bot', local: true, external: false, roles: { admin: false, moderator: false }, tags: [], actor_type: 'Application' }
|
||||
]
|
||||
|
||||
const userProfile = { avatar: 'avatar.jpg', nickname: 'allis', id: '2', tags: [], roles: { admin: true, moderator: false }, local: true, external: false }
|
||||
|
|
|
@ -149,7 +149,7 @@ const users = {
|
|||
},
|
||||
async ConfirmUsersEmail({ dispatch, getters }, { users, _userId, _statusId }) {
|
||||
const updatedUsers = users.map(user => {
|
||||
return { ...user, confirmation_pending: false }
|
||||
return { ...user, is_confirmed: true }
|
||||
})
|
||||
const nicknames = users.map(user => user.nickname)
|
||||
const callApiFn = async() => await confirmUserEmail(nicknames, getters.authHost, getters.token)
|
||||
|
|
|
@ -57,13 +57,13 @@
|
|||
{{ $t('users.rejectAccount') }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="user.local && user.confirmation_pending"
|
||||
v-if="user.local && !user.is_confirmed"
|
||||
divided
|
||||
@click.native="handleEmailConfirmation(user)">
|
||||
{{ $t('users.confirmAccount') }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="user.local && user.confirmation_pending"
|
||||
v-if="user.local && !user.is_confirmed"
|
||||
@click.native="handleConfirmationResend(user)">
|
||||
{{ $t('users.resendConfirmation') }}
|
||||
</el-dropdown-item>
|
||||
|
|
|
@ -244,13 +244,13 @@ export default {
|
|||
applyAction(filtered, approveAccountFn)
|
||||
},
|
||||
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 })
|
||||
|
||||
applyAction(filtered, confirmAccountFn)
|
||||
},
|
||||
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)
|
||||
|
||||
applyAction(filtered, resendConfirmationFn)
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
<span>{{ isDesktop ? $t('users.moderator') : getFirstLetter($t('users.moderator')) }}</span>
|
||||
</el-tag>
|
||||
<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')) }}
|
||||
</el-tag>
|
||||
</el-tooltip>
|
||||
|
|
Loading…
Reference in a new issue