forked from AkkomaGang/admin-fe
Add link to user's profile
This commit is contained in:
parent
23ee4813f8
commit
3e4a3d2609
2 changed files with 24 additions and 8 deletions
|
@ -5,10 +5,12 @@
|
||||||
<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)"/>
|
||||||
|
<router-link v-if="!account.deactivated && account.id" :to="{ name: 'UsersShow', params: { id: account.id }}" @click.native.stop>
|
||||||
|
<div class="status-card-header">
|
||||||
<img :src="account.avatar" class="status-avatar-img">
|
<img :src="account.avatar" class="status-avatar-img">
|
||||||
<a v-if="!account.deactivated" :href="account.url" target="_blank" class="account">
|
|
||||||
<h3 class="status-account-name">{{ account.display_name }}</h3>
|
<h3 class="status-account-name">{{ account.display_name }}</h3>
|
||||||
</a>
|
</div>
|
||||||
|
</router-link>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
<h3 class="status-account-name">{{ account.display_name }}</h3>
|
<h3 class="status-account-name">{{ account.display_name }}</h3>
|
||||||
<h3 class="status-account-name deactivated"> (deactivated)</h3>
|
<h3 class="status-account-name deactivated"> (deactivated)</h3>
|
||||||
|
@ -263,12 +265,16 @@ export default {
|
||||||
.status-account-name {
|
.status-account-name {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
height: 22px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
.status-body {
|
.status-body {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
.status-card-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
.status-checkbox {
|
.status-checkbox {
|
||||||
margin-right: 7px;
|
margin-right: 7px;
|
||||||
}
|
}
|
||||||
|
@ -292,6 +298,7 @@ export default {
|
||||||
.status-header {
|
.status-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
.status-without-content {
|
.status-without-content {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
|
|
|
@ -2,10 +2,14 @@
|
||||||
<div v-if="!loading" class="status-show-container">
|
<div v-if="!loading" class="status-show-container">
|
||||||
<header v-if="isDesktop || isTablet" class="user-page-header">
|
<header v-if="isDesktop || isTablet" class="user-page-header">
|
||||||
<div class="avatar-name-container">
|
<div class="avatar-name-container">
|
||||||
|
<router-link :to="{ name: 'UsersShow', params: { id: user.id }}">
|
||||||
|
<div class="avatar-name-header">
|
||||||
<el-avatar v-if="accountExists(user, 'avatar')" :src="user.avatar" size="large" />
|
<el-avatar v-if="accountExists(user, 'avatar')" :src="user.avatar" size="large" />
|
||||||
<h1 v-if="accountExists(user, 'display_name')">{{ user.display_name }}</h1>
|
<h1 v-if="accountExists(user, 'display_name')">{{ user.display_name }}</h1>
|
||||||
|
</div>
|
||||||
|
</router-link>
|
||||||
<a v-if="accountExists(user, 'url')" :href="user.url" target="_blank" class="account">
|
<a v-if="accountExists(user, 'url')" :href="user.url" target="_blank" class="account">
|
||||||
<i class="el-icon-top-right"/>
|
<i class="el-icon-top-right" title="Open user in instance"/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="left-header-container">
|
<div class="left-header-container">
|
||||||
|
@ -125,6 +129,11 @@ export default {
|
||||||
color: #606266;
|
color: #606266;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.avatar-name-header {
|
||||||
|
display: flex;
|
||||||
|
height: 40px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
.no-statuses {
|
.no-statuses {
|
||||||
margin-left: 28px;
|
margin-left: 28px;
|
||||||
color: #606266;
|
color: #606266;
|
||||||
|
|
Loading…
Reference in a new issue