diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue index ec130b81a..d451670e9 100644 --- a/resources/assets/js/components/Timeline.vue +++ b/resources/assets/js/components/Timeline.vue @@ -73,13 +73,13 @@ {{status.account.username}}
- - +
--> @@ -384,6 +384,57 @@ --> + +
+
Report inappropriate
+
Unfollow
+
Follow
+
Go to post
+ +
Copy Link
+
Cancel
+
+
+ +
Email
+
Facebook
+
Mastodon
+
Pinterest
+
Pixelfed
+
Twitter
+
VK
+
Cancel
+
+ +
+ +
+ +

By using this embed, you agree to our API Terms of Use.

+
+
{ - this.config = res.data; - this.fetchProfile(); - this.fetchTimelineApi(); + this.fetchProfile(); + this.fetchTimelineApi(); - // if(this.config.announcement.enabled == true) { - // let msg = $('
') - // .addClass('alert alert-warning mb-0 rounded-0 text-center font-weight-bold') - // .html(this.config.announcement.message); - // $('body').prepend(msg); - // } - }); + // if(this.config.announcement.enabled == true) { + // let msg = $('
') + // .addClass('alert alert-warning mb-0 rounded-0 text-center font-weight-bold') + // .html(this.config.announcement.message); + // $('body').prepend(msg); + // } }, mounted() { @@ -604,7 +655,8 @@ if (res.data.length && this.loading == false) { let data = res.data; let self = this; - data.forEach(d => { + data.forEach((d, index) => { + console.log(index); if(self.ids.indexOf(d.id) == -1) { self.feed.push(d); self.ids.push(d.id); @@ -669,13 +721,15 @@ if($('body').hasClass('loggedIn') == false) { return; } - + let count = status.favourites_count; + status.favourited = !status.favourited; axios.post('/i/like', { item: status.id }).then(res => { status.favourites_count = res.data.count; - status.favourited = !status.favourited; }).catch(err => { + status.favourited = !status.favourited; + status.favourites_count = count; swal('Error', 'Something went wrong, please try again later.', 'error'); }); }, @@ -1159,7 +1213,97 @@ }) }) + }, + + ctxMenu(status) { + this.ctxMenuStatus = status; + let payload = '