|
113 | 113 | </p>
|
114 | 114 |
|
115 | 115 | <div v-if="showComments">
|
| 116 | + <hr> |
116 | 117 | <div class="postCommentsLoader text-center">
|
117 | 118 | <div class="spinner-border" role="status">
|
118 | 119 | <span class="sr-only">Loading...</span>
|
119 | 120 | </div>
|
120 | 121 | </div>
|
121 |
| - <div class="postCommentsContainer d-none pt-3"> |
| 122 | + <div class="postCommentsContainer d-none"> |
122 | 123 | <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>
|
123 | 124 | <div class="comments">
|
124 | 125 | <div v-for="(reply, index) in results" class="pb-3" :key="'tl' + reply.id + '_' + index">
|
125 |
| - <p class="d-flex justify-content-between align-items-top read-more" style="overflow-y: hidden;"> |
126 |
| - <span> |
127 |
| - <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> |
128 |
| - <span class="text-break" v-html="reply.content"></span> |
129 |
| - </span> |
130 |
| - <span class="pl-2" style="min-width:38px"> |
131 |
| - <span v-on:click="likeReply(reply, $event)"><i v-bind:class="[reply.favourited ? 'fas fa-heart fa-sm text-danger':'far fa-heart fa-sm text-lighter']"></i></span> |
132 |
| - <post-menu :status="reply" :profile="user" :size="'sm'" :modal="'true'" class="d-inline-block pl-2" v-on:deletePost="deleteComment(reply.id, index)"></post-menu> |
133 |
| - </span> |
134 |
| - </p> |
135 |
| - <p class=""> |
136 |
| - <a v-once class="text-muted mr-3 text-decoration-none small" style="width: 20px;" v-text="timeAgo(reply.created_at)" :href="reply.url"></a> |
137 |
| - <span v-if="reply.favourites_count" class="text-muted comment-reaction font-weight-bold mr-3">{{reply.favourites_count == 1 ? '1 like' : reply.favourites_count + ' likes'}}</span> |
138 |
| - <span class="text-muted comment-reaction font-weight-bold cursor-pointer" v-on:click="replyFocus(reply, index)">Reply</span> |
139 |
| - </p> |
140 |
| - <div v-if="reply.reply_count > 0" class="cursor-pointer" style="margin-left:30px;" v-on:click="toggleReplies(reply)"> |
141 |
| - <span class="show-reply-bar"></span> |
142 |
| - <span class="comment-reaction font-weight-bold text-muted">{{reply.thread ? 'Hide' : 'View'}} Replies ({{reply.reply_count}})</span> |
| 126 | + <div v-if="reply.sensitive == true"> |
| 127 | + <div class="card card-body shadow-none border border-left-blue py-3 px-1 text-center small"> |
| 128 | + <p class="mb-0">This comment may contain sensitive material</p> |
| 129 | + <p class="font-weight-bold text-primary cursor-pointer mb-0" @click="reply.sensitive = false;">Show</p> |
| 130 | + </div> |
143 | 131 | </div>
|
144 |
| - <div v-if="reply.thread == true" class="comment-thread"> |
145 |
| - <div v-for="(s, sindex) in reply.replies" class="pb-3" :key="'cr' + s.id + '_' + index"> |
146 |
| - <p class="d-flex justify-content-between align-items-top read-more" style="overflow-y: hidden;"> |
147 |
| - <span> |
148 |
| - <a class="text-dark font-weight-bold mr-1" :href="s.account.url" :title="s.account.username">{{s.account.username}}</a> |
149 |
| - <span class="text-break" v-html="s.content"></span> |
150 |
| - </span> |
151 |
| - <span class="pl-2" style="min-width:38px"> |
152 |
| - <span v-on:click="likeReply(s, $event)"><i v-bind:class="[s.favourited ? 'fas fa-heart fa-sm text-danger':'far fa-heart fa-sm text-lighter']"></i></span> |
153 |
| - <post-menu :status="s" :profile="user" :size="'sm'" :modal="'true'" class="d-inline-block pl-2" v-on:deletePost="deleteCommentReply(s.id, sindex, index) "></post-menu> |
154 |
| - </span> |
155 |
| - </p> |
156 |
| - <p class=""> |
157 |
| - <a v-once class="text-muted mr-3 text-decoration-none small" style="width: 20px;" v-text="timeAgo(s.created_at)" :href="s.url"></a> |
158 |
| - <span v-if="s.favourites_count" class="text-muted comment-reaction font-weight-bold mr-3">{{s.favourites_count == 1 ? '1 like' : s.favourites_count + ' likes'}}</span> |
159 |
| - </p> |
| 132 | + <div v-else> |
| 133 | + <p class="d-flex justify-content-between align-items-top read-more" style="overflow-y: hidden;"> |
| 134 | + <span> |
| 135 | + <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> |
| 136 | + <span class="text-break" v-html="reply.content"></span> |
| 137 | + </span> |
| 138 | + <span class="pl-2" style="min-width:38px"> |
| 139 | + <span v-on:click="likeReply(reply, $event)"><i v-bind:class="[reply.favourited ? 'fas fa-heart fa-sm text-danger':'far fa-heart fa-sm text-lighter']"></i></span> |
| 140 | + <post-menu :status="reply" :profile="user" :size="'sm'" :modal="'true'" class="d-inline-block pl-2" v-on:deletePost="deleteComment(reply.id, index)"></post-menu> |
| 141 | + </span> |
| 142 | + </p> |
| 143 | + <p class=""> |
| 144 | + <a v-once class="text-muted mr-3 text-decoration-none small" style="width: 20px;" v-text="timeAgo(reply.created_at)" :href="reply.url"></a> |
| 145 | + <span v-if="reply.favourites_count" class="text-muted comment-reaction font-weight-bold mr-3">{{reply.favourites_count == 1 ? '1 like' : reply.favourites_count + ' likes'}}</span> |
| 146 | + <span class="text-muted comment-reaction font-weight-bold cursor-pointer" v-on:click="replyFocus(reply, index)">Reply</span> |
| 147 | + </p> |
| 148 | + <div v-if="reply.reply_count > 0" class="cursor-pointer" style="margin-left:30px;" v-on:click="toggleReplies(reply)"> |
| 149 | + <span class="show-reply-bar"></span> |
| 150 | + <span class="comment-reaction font-weight-bold text-muted">{{reply.thread ? 'Hide' : 'View'}} Replies ({{reply.reply_count}})</span> |
| 151 | + </div> |
| 152 | + <div v-if="reply.thread == true" class="comment-thread"> |
| 153 | + <div v-for="(s, sindex) in reply.replies" class="pb-3" :key="'cr' + s.id + '_' + index"> |
| 154 | + <p class="d-flex justify-content-between align-items-top read-more" style="overflow-y: hidden;"> |
| 155 | + <span> |
| 156 | + <a class="text-dark font-weight-bold mr-1" :href="s.account.url" :title="s.account.username">{{s.account.username}}</a> |
| 157 | + <span class="text-break" v-html="s.content"></span> |
| 158 | + </span> |
| 159 | + <span class="pl-2" style="min-width:38px"> |
| 160 | + <span v-on:click="likeReply(s, $event)"><i v-bind:class="[s.favourited ? 'fas fa-heart fa-sm text-danger':'far fa-heart fa-sm text-lighter']"></i></span> |
| 161 | + <post-menu :status="s" :profile="user" :size="'sm'" :modal="'true'" class="d-inline-block pl-2" v-on:deletePost="deleteCommentReply(s.id, sindex, index) "></post-menu> |
| 162 | + </span> |
| 163 | + </p> |
| 164 | + <p class=""> |
| 165 | + <a v-once class="text-muted mr-3 text-decoration-none small" style="width: 20px;" v-text="timeAgo(s.created_at)" :href="s.url"></a> |
| 166 | + <span v-if="s.favourites_count" class="text-muted comment-reaction font-weight-bold mr-3">{{s.favourites_count == 1 ? '1 like' : s.favourites_count + ' likes'}}</span> |
| 167 | + </p> |
| 168 | + </div> |
160 | 169 | </div>
|
161 | 170 | </div>
|
162 | 171 | </div>
|
|
0 commit comments