forked from AkkomaGang/admin-fe
Show reported statuses and add styles
This commit is contained in:
parent
299c9f74bb
commit
75cc181396
1 changed files with 82 additions and 13 deletions
|
@ -2,33 +2,59 @@
|
||||||
<el-timeline-item :timestamp="parseTimestamp(report.created_at)" placement="top" class="timeline-item-container">
|
<el-timeline-item :timestamp="parseTimestamp(report.created_at)" placement="top" class="timeline-item-container">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div class="header-container">
|
<div class="header-container">
|
||||||
<h4>Report on {{ report.account.display_name }}</h4>
|
<h3 class="report-title">Report on {{ report.account.display_name }}</h3>
|
||||||
<div>
|
<div>
|
||||||
<el-tag :type="getStateType(report.state)" size="large">{{ capitalizeFirstLetter(report.state) }}</el-tag>
|
<el-tag :type="getStateType(report.state)" size="large">{{ capitalizeFirstLetter(report.state) }}</el-tag>
|
||||||
<el-button plain size="small" @click="toggleNoteInput">{{ $t('reports.reply') }}</el-button>
|
<!-- <el-button plain size="small" @click="toggleNoteInput">{{ $t('reports.reply') }}</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h5 class="id">ID: {{ report.id }}</h5>
|
<h5 class="id">ID: {{ report.id }}</h5>
|
||||||
<div class="report-row">
|
<div class="line"/>
|
||||||
<span>Account:</span>
|
<div>
|
||||||
|
<span class="report-row">Account:</span>
|
||||||
<img
|
<img
|
||||||
:src="report.account.avatar"
|
:src="report.account.avatar"
|
||||||
alt="User's avatar"
|
alt="User's avatar"
|
||||||
class="avatar-img">
|
class="avatar-img">
|
||||||
<a :href="report.account.url" target="_blank" class="account">{{ report.account.acct }}</a>
|
<a :href="report.account.url" target="_blank" class="account">{{ report.account.acct }}</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="report-row">
|
<div class="line"/>
|
||||||
<span>Content: {{ report.content }}</span>
|
<div>
|
||||||
|
<span class="report-row">Content: {{ report.content.length > 0 ? report.content : '-' }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="report-row">
|
<div class="line"/>
|
||||||
<span>Actor:</span>
|
<div>
|
||||||
|
<span class="report-row">Actor:</span>
|
||||||
<img
|
<img
|
||||||
:src="report.actor.avatar"
|
:src="report.actor.avatar"
|
||||||
alt="User's avatar"
|
alt="User's avatar"
|
||||||
class="avatar-img">
|
class="avatar-img">
|
||||||
<a :href="report.actor.url" target="_blank" class="account">{{ report.actor.acct }}</a>
|
<a :href="report.actor.url" target="_blank" class="account">{{ report.actor.acct }}</a>
|
||||||
</div>
|
</div>
|
||||||
<el-collapse v-model="showNotes">
|
<div class="statuses">
|
||||||
|
<el-collapse>
|
||||||
|
<el-collapse-item :title="getStatusesTitle(report.statuses)">
|
||||||
|
<el-card v-for="status in report.statuses" :key="status.id" class="status-card">
|
||||||
|
<div slot="header">
|
||||||
|
<div class="status-header">
|
||||||
|
<img :src="status.account.avatar" alt="User's avatar" class="status-avatar-img">
|
||||||
|
<h3 class="status-account-name">{{ status.account.display_name }}</h3>
|
||||||
|
</div>
|
||||||
|
<a :href="status.account.url" target="_blank" class="account">
|
||||||
|
@{{ status.account.acct }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="status-body">
|
||||||
|
<span class="status-content">{{ status.content }}</span>
|
||||||
|
<a :href="status.url" target="_blank" class="account">
|
||||||
|
{{ parseTimestamp(status.created_at) }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-collapse-item>
|
||||||
|
</el-collapse>
|
||||||
|
</div>
|
||||||
|
<!-- <el-collapse v-model="showNotes">
|
||||||
<el-collapse-item :title="$t('reports.showNotes')" name="showNotes">
|
<el-collapse-item :title="$t('reports.showNotes')" name="showNotes">
|
||||||
<div v-if="report.statuses.length > 0">
|
<div v-if="report.statuses.length > 0">
|
||||||
<div v-for="note in report.statuses" :key="note.id">
|
<div v-for="note in report.statuses" :key="note.id">
|
||||||
|
@ -54,7 +80,7 @@
|
||||||
<el-input v-model="note" :rows="2" type="textarea" autofocus/>
|
<el-input v-model="note" :rows="2" type="textarea" autofocus/>
|
||||||
<el-button class="submit-button" plain size="small" @click="addNewNote(report.id)">{{ $t('reports.submit') }}</el-button>
|
<el-button class="submit-button" plain size="small" @click="addNewNote(report.id)">{{ $t('reports.submit') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-collapse>
|
</el-collapse> -->
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-timeline-item>
|
</el-timeline-item>
|
||||||
</template>
|
</template>
|
||||||
|
@ -122,6 +148,9 @@ export default {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getStatusesTitle(statuses) {
|
||||||
|
return `Reported statuses: ${statuses.length} item(s)`
|
||||||
|
},
|
||||||
parseTimestamp(timestamp) {
|
parseTimestamp(timestamp) {
|
||||||
return moment(timestamp).format('YYYY-MM-DD HH:mm')
|
return moment(timestamp).format('YYYY-MM-DD HH:mm')
|
||||||
},
|
},
|
||||||
|
@ -140,9 +169,14 @@ export default {
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
width: 15px;
|
width: 15px;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
.el-card__body {
|
.el-card__body {
|
||||||
padding: 17px 17px 0;
|
padding: 17px;
|
||||||
|
}
|
||||||
|
.el-card__header {
|
||||||
|
background-color: #FAFAFA;
|
||||||
|
padding: 10px 20px;
|
||||||
}
|
}
|
||||||
.el-collapse {
|
.el-collapse {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
|
@ -168,12 +202,18 @@ export default {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
height: 25px;
|
height: 30px;
|
||||||
}
|
}
|
||||||
.id {
|
.id {
|
||||||
color: gray;
|
color: gray;
|
||||||
margin: 0 0 12px;
|
margin: 0 0 12px;
|
||||||
}
|
}
|
||||||
|
.line {
|
||||||
|
width: 100%;
|
||||||
|
height: 0;
|
||||||
|
border: 0.5px solid #EBEEF5;
|
||||||
|
margin: 15px 0 15px;
|
||||||
|
}
|
||||||
.new-note {
|
.new-note {
|
||||||
p {
|
p {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
@ -191,7 +231,36 @@ export default {
|
||||||
color: gray;
|
color: gray;
|
||||||
}
|
}
|
||||||
.report-row {
|
.report-row {
|
||||||
margin-bottom: 5px;
|
font-size: 13px;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
.report-title {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.status-account-name {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.status-avatar-img {
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
.status-body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.status-card {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
.status-content {
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
.status-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.statuses {
|
||||||
|
margin-top: 15px;
|
||||||
}
|
}
|
||||||
.submit-button {
|
.submit-button {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
Loading…
Reference in a new issue