forked from mirror/pixelfed
Update PostComponent, hide sensitive comments behind warning
This commit is contained in:
parent
1cff278f9e
commit
42d81fc2aa
1 changed files with 44 additions and 35 deletions
|
@ -113,15 +113,23 @@
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div v-if="showComments">
|
<div v-if="showComments">
|
||||||
|
<hr>
|
||||||
<div class="postCommentsLoader text-center">
|
<div class="postCommentsLoader text-center">
|
||||||
<div class="spinner-border" role="status">
|
<div class="spinner-border" role="status">
|
||||||
<span class="sr-only">Loading...</span>
|
<span class="sr-only">Loading...</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="postCommentsContainer d-none pt-3">
|
<div class="postCommentsContainer d-none">
|
||||||
<p v-if="status.reply_count > 10"class="mb-1 text-center load-more-link d-none"><a href="#" class="text-muted" v-on:click="loadMore">Load more comments</a></p>
|
<p v-if="status.reply_count > 10"class="mb-1 text-center load-more-link d-none"><a href="#" class="text-muted" v-on:click="loadMore">Load more comments</a></p>
|
||||||
<div class="comments">
|
<div class="comments">
|
||||||
<div v-for="(reply, index) in results" class="pb-3" :key="'tl' + reply.id + '_' + index">
|
<div v-for="(reply, index) in results" class="pb-3" :key="'tl' + reply.id + '_' + index">
|
||||||
|
<div v-if="reply.sensitive == true">
|
||||||
|
<div class="card card-body shadow-none border border-left-blue py-3 px-1 text-center small">
|
||||||
|
<p class="mb-0">This comment may contain sensitive material</p>
|
||||||
|
<p class="font-weight-bold text-primary cursor-pointer mb-0" @click="reply.sensitive = false;">Show</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
<p class="d-flex justify-content-between align-items-top read-more" style="overflow-y: hidden;">
|
<p class="d-flex justify-content-between align-items-top read-more" style="overflow-y: hidden;">
|
||||||
<span>
|
<span>
|
||||||
<a class="text-dark font-weight-bold mr-1" :href="reply.account.url" v-bind:title="reply.account.username">{{truncate(reply.account.username,15)}}</a>
|
<a class="text-dark font-weight-bold mr-1" :href="reply.account.url" v-bind:title="reply.account.username">{{truncate(reply.account.username,15)}}</a>
|
||||||
|
@ -163,6 +171,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue