Merge branch 'fix/language-inconsistency-in-account-type' into 'develop'

Fix language inconsistency and tag display on Users and User profile pages

Closes #115

See merge request pleroma/admin-fe!132
This commit is contained in:
Angelina Filippova 2020-05-29 19:44:31 +00:00
commit 019b24245a
3 changed files with 31 additions and 20 deletions

View file

@ -171,16 +171,16 @@ export default {
id: 'ID',
name: 'Name',
status: 'Status',
local: 'local',
external: 'external',
deactivated: 'deactivated',
active: 'active',
unconfirmed: 'unconfirmed',
local: 'Local',
external: 'External',
deactivated: 'Deactivated',
active: 'Active',
unconfirmed: 'Unconfirmed',
actions: 'Actions',
activate: 'Activate',
deactivate: 'Deactivate',
admin: 'admin',
moderator: 'moderator',
admin: 'Admin',
moderator: 'Moderator',
moderation: 'Moderation',
revokeAdmin: 'Revoke Admin',
grantAdmin: 'Grant Admin',
@ -205,8 +205,8 @@ export default {
moderateUser: 'Moderate user',
moderateUsers: 'Moderate multiple users',
createAccount: 'Create new account',
apply: 'apply',
remove: 'remove',
apply: 'Apply',
remove: 'Remove',
grantRightConfirmation: 'Are you sure you want to grant {right} rights to all selected users?',
revokeRightConfirmation: 'Are you sure you want to revoke {right} rights from all selected users?',
activateMultipleUsersConfirmation: 'Are you sure you want to activate accounts of all selected users?',
@ -256,15 +256,15 @@ export default {
tags: 'Tags',
moderator: 'Moderator',
admin: 'Admin',
local: 'local',
external: 'external',
localUppercase: 'Local',
local: 'Local',
external: 'External',
accountType: 'Account type',
nickname: 'Nickname',
recentStatuses: 'Recent Statuses',
roles: 'Roles',
activeUppercase: 'Active',
active: 'active',
deactivated: 'deactivated',
active: 'Active',
status: 'Status',
deactivated: 'Deactivated',
noStatuses: 'No statuses to show',
securitySettings: {
email: 'Email',
@ -284,7 +284,7 @@ export default {
},
usersFilter: {
inputPlaceholder: 'Select filter',
byUserType: 'By user type',
byAccountType: 'By account type',
local: 'Local',
external: 'External',
byStatus: 'By status',

View file

@ -6,7 +6,7 @@
multiple
class="select-field"
@change="toggleFilters">
<el-option-group :label="$t('usersFilter.byUserType')">
<el-option-group :label="$t('usersFilter.byAccountType')">
<el-option value="local">{{ $t('usersFilter.local') }}</el-option>
<el-option value="external">{{ $t('usersFilter.external') }}</el-option>
</el-option-group>

View file

@ -59,7 +59,7 @@
<tr class="el-table__row">
<td>{{ $t('userProfile.tags') }}</td>
<td>
<el-tag v-for="tag in user.tags" :key="tag" class="user-profile-tag">{{ tag }}</el-tag>
<el-tag v-for="tag in user.tags" :key="tag" class="user-profile-tag">{{ humanizeTag(tag) }}</el-tag>
<span v-if="user.tags.length === 0"></span>
</td>
</tr>
@ -76,14 +76,14 @@
</td>
</tr>
<tr class="el-table__row">
<td>{{ $t('userProfile.localUppercase') }}</td>
<td>{{ $t('userProfile.accountType') }}</td>
<td>
<el-tag v-if="user.local" type="info">{{ $t('userProfile.local') }}</el-tag>
<el-tag v-if="!user.local" type="info">{{ $t('userProfile.external') }}</el-tag>
</td>
</tr>
<tr class="el-table__row">
<td>{{ $t('userProfile.activeUppercase') }}</td>
<td>{{ $t('userProfile.status') }}</td>
<td>
<el-tag v-if="!user.deactivated" type="success">{{ $t('userProfile.active') }}</el-tag>
<el-tag v-if="user.deactivated" type="danger">{{ $t('userProfile.deactivated') }}</el-tag>
@ -177,6 +177,17 @@ export default {
this.resetPasswordDialogOpen = false
this.$store.dispatch('RemovePasswordToken')
},
humanizeTag(tag) {
const mapTags = {
'force_nsfw': 'Force NSFW',
'strip_media': 'Strip Media',
'force_unlisted': 'Force Unlisted',
'sandbox': 'Sandbox',
'disable_remote_subscription': 'Disable remote subscription',
'disable_any_subscription': 'Disable any subscription'
}
return mapTags[tag]
},
onTogglePrivate() {
this.$store.dispatch('FetchUserProfile', { userId: this.$route.params.id, godmode: this.showPrivate })
},