diff --git a/resources/assets/js/components/PostComponent.vue b/resources/assets/js/components/PostComponent.vue index c3b9f6258..cf6665a95 100644 --- a/resources/assets/js/components/PostComponent.vue +++ b/resources/assets/js/components/PostComponent.vue @@ -56,11 +56,11 @@
-
+
- +
@@ -164,10 +164,10 @@
-
@@ -195,10 +195,10 @@
-
@@ -281,7 +281,7 @@ export default { $('head title').text(title); } }, - + methods: { authCheck() { let authed = $('body').hasClass('loggedIn'); @@ -495,19 +495,22 @@ export default { }, deletePost() { - if($('body').hasClass('loggedIn') == false) { - return; - } + var result = confirm('Are you sure you want to delete this post?'); + if (result) { + if($('body').hasClass('loggedIn') == false) { + return; + } - axios.post('/i/delete', { - type: 'status', - item: this.status.id - }).then(res => { - swal('Success', 'You have successfully deleted this post', 'success'); - }).catch(err => { - swal('Error', 'Something went wrong. Please try again later.', 'error'); - }); + axios.post('/i/delete', { + type: 'status', + item: this.status.id + }).then(res => { + swal('Success', 'You have successfully deleted this post', 'success'); + }).catch(err => { + swal('Error', 'Something went wrong. Please try again later.', 'error'); + }); + } } } } - \ No newline at end of file +