From 1b2f4f0f7cfea4693f5ab843c6ad63b6dc5f2498 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 20 May 2019 21:11:38 -0600 Subject: [PATCH] Update PostComponent --- .../assets/js/components/PostComponent.vue | 41 +++++++++++++++---- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/resources/assets/js/components/PostComponent.vue b/resources/assets/js/components/PostComponent.vue index 205f74a87..75e379944 100644 --- a/resources/assets/js/components/PostComponent.vue +++ b/resources/assets/js/components/PostComponent.vue @@ -107,7 +107,7 @@
-

+

{{statusUsername}}

@@ -121,7 +121,7 @@
-
+

{{truncate(reply.account.username,15)}} @@ -133,7 +133,7 @@

- + {{reply.favourites_count == 1 ? '1 like' : reply.favourites_count + ' likes'}} Reply

@@ -142,12 +142,23 @@ {{reply.thread ? 'Hide' : 'View'}} Replies ({{reply.reply_count}})
-

- - {{s.account.username}} - - -

+
+

+ + {{s.account.username}} + + + + + + +

+

+ + {{s.favourites_count == 1 ? '1 like' : s.favourites_count + ' likes'}} + Reply +

+
@@ -772,6 +783,18 @@ export default { }); }, + deleteCommentReply(id, i, pi) { + axios.post('/i/delete', { + type: 'comment', + item: id + }).then(res => { + this.results[pi].replies.splice(i, 1); + --this.results[pi].reply_count; + }).catch(err => { + swal('Something went wrong!', 'Please try again later', 'error'); + }); + }, + l(e) { let len = e.length; if(len < 10) { return e; }