forked from AkkomaGang/admin-fe
Update user profile page for users without valid nickame
This commit is contained in:
parent
1fa258ff23
commit
41c26db820
2 changed files with 12 additions and 9 deletions
|
@ -6,16 +6,14 @@
|
||||||
<div class="status-account-container">
|
<div class="status-account-container">
|
||||||
<div class="status-account">
|
<div class="status-account">
|
||||||
<el-checkbox v-if="showCheckbox" class="status-checkbox" @change="handleStatusSelection(account)"/>
|
<el-checkbox v-if="showCheckbox" class="status-checkbox" @change="handleStatusSelection(account)"/>
|
||||||
<img :src="account.avatar" class="status-avatar-img">
|
<img v-if="isValid(account)" :src="account.avatar" class="status-avatar-img">
|
||||||
<a v-if="!account.deactivated" :href="account.url" target="_blank" class="account">
|
<a v-if="isValid(account)" :href="account.url" target="_blank" class="account">
|
||||||
<h3 class="status-account-name">{{ account.display_name }}</h3>
|
<h3 class="status-account-name">{{ account.nickname }}</h3>
|
||||||
</a>
|
</a>
|
||||||
<span v-else>
|
<span v-else class="deactivated">
|
||||||
<h3 class="status-account-name">{{ account.display_name }}</h3>
|
<h3 class="status-account-name">({{ $t('users.invalidNickname') }})</h3>
|
||||||
<h3 class="status-account-name deactivated"> (deactivated)</h3>
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="status-actions">
|
<div class="status-actions">
|
||||||
<el-tag v-if="status.sensitive" type="warning" size="large">{{ $t('reports.sensitive') }}</el-tag>
|
<el-tag v-if="status.sensitive" type="warning" size="large">{{ $t('reports.sensitive') }}</el-tag>
|
||||||
|
@ -204,6 +202,9 @@ export default {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
isValid(account) {
|
||||||
|
return account.nickname && account.id
|
||||||
|
},
|
||||||
optionPercent(poll, pollOption) {
|
optionPercent(poll, pollOption) {
|
||||||
const allVotes = poll.options.reduce((acc, option) => (acc + option.votes_count), 0)
|
const allVotes = poll.options.reduce((acc, option) => (acc + option.votes_count), 0)
|
||||||
if (allVotes === 0) {
|
if (allVotes === 0) {
|
||||||
|
@ -231,7 +232,8 @@ export default {
|
||||||
}
|
}
|
||||||
.deactivated {
|
.deactivated {
|
||||||
color: gray;
|
color: gray;
|
||||||
font-size: 15px;
|
line-height: 32px;
|
||||||
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
.image {
|
.image {
|
||||||
width: 20%;
|
width: 20%;
|
||||||
|
|
|
@ -239,7 +239,8 @@ export default {
|
||||||
confirmAccount: 'Confirm account',
|
confirmAccount: 'Confirm account',
|
||||||
confirmAccounts: 'Confirm accounts',
|
confirmAccounts: 'Confirm accounts',
|
||||||
resendConfirmation: 'Resend confirmation email',
|
resendConfirmation: 'Resend confirmation email',
|
||||||
invalidUser: 'This account is invalid and can\'t be modified'
|
invalidUser: 'This account is invalid and can\'t be modified',
|
||||||
|
invalidNickname: 'invalid nickname'
|
||||||
},
|
},
|
||||||
statuses: {
|
statuses: {
|
||||||
statuses: 'Statuses',
|
statuses: 'Statuses',
|
||||||
|
|
Loading…
Reference in a new issue