forked from AkkomaGang/admin-fe
Add link to note's author profile page
This commit is contained in:
parent
a8fb2a7255
commit
d0939463c2
1 changed files with 23 additions and 9 deletions
|
@ -2,15 +2,23 @@
|
||||||
<el-card class="note-card">
|
<el-card class="note-card">
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<div class="note-header">
|
<div class="note-header">
|
||||||
<div class="note-actor">
|
<router-link
|
||||||
<img v-if="propertyExists(note.user, 'avatar')" :src="note.user.avatar" class="note-avatar-img">
|
v-if="propertyExists(note.user, 'id')"
|
||||||
<span v-if="propertyExists(note.user, 'nickname')" class="note-actor-name">{{ note.user.nickname }}</span>
|
:to="{ name: 'UsersShow', params: { id: note.user.id }}"
|
||||||
</div>
|
class="router-link">
|
||||||
<div>
|
<div class="note-actor">
|
||||||
<el-button size="mini" @click.native="handleNoteDeletion(note.id, report.id)">
|
<img
|
||||||
{{ $t('reports.deleteNote') }}
|
v-if="propertyExists(note.user, 'avatar')"
|
||||||
</el-button>
|
:src="note.user.avatar"
|
||||||
</div>
|
alt="avatar"
|
||||||
|
class="note-avatar-img">
|
||||||
|
<span v-if="propertyExists(note.user, 'nickname')" class="note-actor-name">{{ note.user.nickname }}</span>
|
||||||
|
<span v-else class="note-actor-name deactivated">({{ $t('users.invalidNickname') }})</span>
|
||||||
|
</div>
|
||||||
|
</router-link>
|
||||||
|
<el-button size="mini" @click.native="handleNoteDeletion(note.id, report.id)">
|
||||||
|
{{ $t('reports.deleteNote') }}
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="note-body">
|
<div class="note-body">
|
||||||
|
@ -68,6 +76,9 @@ export default {
|
||||||
a {
|
a {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
.deactivated {
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
.el-icon-arrow-right {
|
.el-icon-arrow-right {
|
||||||
margin-right: 6px;
|
margin-right: 6px;
|
||||||
}
|
}
|
||||||
|
@ -108,6 +119,9 @@ export default {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
.router-link {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
@media only screen and (max-width:480px) {
|
@media only screen and (max-width:480px) {
|
||||||
.el-card__header {
|
.el-card__header {
|
||||||
|
|
Loading…
Reference in a new issue