forked from AkkomaGang/admin-fe
Humanize tags on User Profile page
This commit is contained in:
parent
d92d018831
commit
247fdf61f4
1 changed files with 12 additions and 1 deletions
|
@ -59,7 +59,7 @@
|
||||||
<tr class="el-table__row">
|
<tr class="el-table__row">
|
||||||
<td>{{ $t('userProfile.tags') }}</td>
|
<td>{{ $t('userProfile.tags') }}</td>
|
||||||
<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>
|
<span v-if="user.tags.length === 0">—</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -177,6 +177,17 @@ export default {
|
||||||
this.resetPasswordDialogOpen = false
|
this.resetPasswordDialogOpen = false
|
||||||
this.$store.dispatch('RemovePasswordToken')
|
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() {
|
onTogglePrivate() {
|
||||||
this.$store.dispatch('FetchUserProfile', { userId: this.$route.params.id, godmode: this.showPrivate })
|
this.$store.dispatch('FetchUserProfile', { userId: this.$route.params.id, godmode: this.showPrivate })
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue