diff --git a/resources/assets/js/components/PostComponent.vue b/resources/assets/js/components/PostComponent.vue
index c0c157106..eb207c547 100644
--- a/resources/assets/js/components/PostComponent.vue
+++ b/resources/assets/js/components/PostComponent.vue
@@ -137,6 +137,18 @@
+
+
+
+
+
@@ -331,7 +343,7 @@
}
.emoji-reactions .nav-item {
font-size: 1.2rem;
- padding: 7px;
+ padding: 9px;
cursor: pointer;
}
.emoji-reactions::-webkit-scrollbar {
@@ -372,7 +384,9 @@ export default {
showComments: false,
warning: false,
loaded: false,
- loading: null
+ loading: null,
+ replyingToId: this.statusId,
+ emoji: ['๐','๐','๐','๐คฃ','๐','๐','๐
','๐','๐','๐','๐','๐','๐','๐','๐','๐','๐','โบ๏ธ','๐','๐ค','๐คฉ','๐ค','๐คจ','๐','๐','๐ถ','๐','๐','๐ฃ','๐ฅ','๐ฎ','๐ค','๐ฏ','๐ช','๐ซ','๐ด','๐','๐','๐','๐','๐คค','๐','๐','๐','๐','๐','๐ค','๐ฒ','โน๏ธ','๐','๐','๐','๐','๐ค','๐ข','๐ญ','๐ฆ','๐ง','๐จ','๐ฉ','๐คฏ','๐ฌ','๐ฐ','๐ฑ','๐ณ','๐คช','๐ต','๐ก','๐ ','๐คฌ','๐ท','๐ค','๐ค','๐คข','๐คฎ','๐คง','๐','๐ค ','๐คก','๐คฅ','๐คซ','๐คญ','๐ง','๐ค','๐','๐ฟ','๐น','๐บ','๐','๐ป','๐ฝ','๐ค','๐ฉ','๐บ','๐ธ','๐น','๐ป','๐ผ','๐ฝ','๐','๐ฟ','๐พ','๐คฒ','๐','๐','๐','๐ค','๐','๐','๐','โ','๐ค','๐ค','๐ค','โ๏ธ','๐ค','๐ค','๐','๐','๐','๐','๐','โ๏ธ','โ','๐ค','๐','๐','๐','๐ค','๐ช','๐','โ๏ธ','๐','๐','๐','๐','๐','๐
','๐','๐','๐ฃ','๐','๐','๐ง ','๐ฃ','๐ค','๐ฅ'],
}
},
@@ -668,16 +682,20 @@ export default {
return;
}
let data = {
- item: this.statusId,
+ item: this.replyingToId,
comment: this.replyText
}
axios.post('/i/comment', data)
.then(function(res) {
let entity = res.data.entity;
- self.results.push(entity);
+ if(entity.in_reply_to_id == self.status.id) {
+ self.results.push(entity);
+ let elem = $('.status-comments')[0];
+ elem.scrollTop = elem.clientHeight;
+ } else {
+
+ }
self.replyText = '';
- let elem = $('.status-comments')[0];
- elem.scrollTop = elem.clientHeight;
});
},
@@ -699,6 +717,7 @@ export default {
},
replyFocus(e) {
+ this.replyingToId = e.id;
this.reply_to_profile_id = e.account.id;
this.replyText = '@' + e.account.username + ' ';
$('textarea[name="comment"]').focus();
@@ -910,6 +929,23 @@ export default {
swal('Private Post', 'This post is only visible to followers.', 'info');
break;
}
+ },
+
+ toggleReplies(reply) {
+ if(reply.thread) {
+ reply.thread = false;
+ } else {
+ if(reply.replies.length > 0) {
+ reply.thread = true;
+ return;
+ }
+ let url = '/api/v2/comments/'+reply.account.username+'/status/'+reply.id;
+ axios.get(url)
+ .then(response => {
+ reply.replies = _.reverse(response.data.data);
+ reply.thread = true;
+ });
+ }
}
},
+ + {{s.account.username}} + + +
+