From d8b3e9e9df90adcf2a38b4e1ccaa82758b9118b5 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Sat, 22 Aug 2020 03:04:16 +0300 Subject: [PATCH] Show actor type on user show page and manage it from that page --- src/lang/en.js | 7 +++++-- src/store/modules/users.js | 3 +-- src/views/users/components/ModerationDropdown.vue | 13 +++++++++---- src/views/users/show.vue | 11 ++++++++++- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/src/lang/en.js b/src/lang/en.js index 8e9629b2..399f7ec2 100644 --- a/src/lang/en.js +++ b/src/lang/en.js @@ -271,7 +271,9 @@ export default { invalidNickname: 'invalid nickname', passwordResetTokenGenerated: 'Password reset token was generated:', linkToResetPassword: 'You can also use this link to reset password:', - registrationReason: 'Registration Reason' + registrationReason: 'Registration Reason', + service: 'Service', + person: 'Person' }, statuses: { statuses: 'Statuses', @@ -292,7 +294,8 @@ export default { admin: 'Admin', local: 'Local', external: 'External', - accountType: 'Account type', + accountType: 'Account Type', + actorType: 'Actor Type', nickname: 'Nickname', recentStatuses: 'Recent Statuses', roles: 'Roles', diff --git a/src/store/modules/users.js b/src/store/modules/users.js index e90c770d..631bff8e 100644 --- a/src/store/modules/users.js +++ b/src/store/modules/users.js @@ -281,10 +281,9 @@ const users = { }, async UpdateActorType({ dispatch, getters }, { user, type, _userId, _statusId }) { const updatedUsers = [{ ...user, actor_type: type }] - const nickname = [user.nickname] const credentials = { actor_type: type } - const callApiFn = async() => await updateUserCredentials(nickname, credentials, getters.authHost, getters.token) + const callApiFn = async() => await updateUserCredentials(user.nickname, credentials, getters.authHost, getters.token) dispatch('ApplyChanges', { updatedUsers, callApiFn, userId: _userId, statusId: _statusId }) } diff --git a/src/views/users/components/ModerationDropdown.vue b/src/views/users/components/ModerationDropdown.vue index a0e8c993..fd6ba5a3 100644 --- a/src/views/users/components/ModerationDropdown.vue +++ b/src/views/users/components/ModerationDropdown.vue @@ -18,9 +18,9 @@ - - - + + + ID - + {{ user.id }} + + {{ $t('userProfile.actorType') }} + + + {{ userCredentials.actor_type }} + + + {{ $t('userProfile.tags') }}