diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b611fc28..d5c424fc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,7 @@ - Updated status views, remove like counts from status embed. ([1a2e41b1](https://github.com/pixelfed/pixelfed/commit/1a2e41b1)) - Updated Profile, fix unauthenticated private profiles. ([9017f7c4](https://github.com/pixelfed/pixelfed/commit/9017f7c4)) - Updated PublicApiController, impr home timeline perf. ([4fe42e5b](https://github.com/pixelfed/pixelfed/commit/4fe42e5b)) +- Updated Timeline.vue, fix comment button. ([b6b5ce7c](https://github.com/pixelfed/pixelfed/commit/b6b5ce7c)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.11.0 (2021-06-01)](https://github.com/pixelfed/pixelfed/compare/v0.10.10...v0.11.0) diff --git a/public/js/profile.js b/public/js/profile.js index 285de7895..084379d02 100644 Binary files a/public/js/profile.js and b/public/js/profile.js differ diff --git a/public/js/timeline.js b/public/js/timeline.js index e16307f14..b65af231f 100644 Binary files a/public/js/timeline.js and b/public/js/timeline.js differ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 4b26e6ae2..83e16c39b 100644 Binary files a/public/mix-manifest.json and b/public/mix-manifest.json differ diff --git a/resources/assets/js/components/Profile.vue b/resources/assets/js/components/Profile.vue index c00e9676d..eb9bb6cef 100644 --- a/resources/assets/js/components/Profile.vue +++ b/resources/assets/js/components/Profile.vue @@ -424,7 +424,7 @@
- +

@@ -471,7 +471,7 @@

- +

diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue index d0562adba..9f8f0e6c2 100644 --- a/resources/assets/js/components/Timeline.vue +++ b/resources/assets/js/components/Timeline.vue @@ -942,6 +942,64 @@ return; }, + fetchStatusComments(status, card) { + let url = '/api/v2/comments/'+status.account.id+'/status/'+status.id; + axios.get(url) + .then(response => { + let self = this; + this.replies = _.reverse(response.data.data); + this.pagination = response.data.meta.pagination; + if(this.replies.length > 0) { + $('.load-more-link').removeClass('d-none'); + } + $('.postCommentsLoader').addClass('d-none'); + $('.postCommentsContainer').removeClass('d-none'); + // setTimeout(function() { + // document.querySelectorAll('.status-comment .postCommentsContainer .comment-body a').forEach(function(i, e) { + // i.href = App.util.format.rewriteLinks(i); + // }); + // }, 500); + }).catch(error => { + if(!error.response) { + $('.postCommentsLoader .lds-ring') + .attr('style','width:100%') + .addClass('pt-4 font-weight-bold text-muted') + .text('An error occurred, cannot fetch comments. Please try again later.'); + } else { + switch(error.response.status) { + case 401: + $('.postCommentsLoader .lds-ring') + .attr('style','width:100%') + .addClass('pt-4 font-weight-bold text-muted') + .text('Please login to view.'); + break; + default: + $('.postCommentsLoader .lds-ring') + .attr('style','width:100%') + .addClass('pt-4 font-weight-bold text-muted') + .text('An error occurred, cannot fetch comments. Please try again later.'); + break; + } + } + }); + }, + + statusUrl(status) { + if(status.local == true) { + return status.url; + } + + return '/i/web/post/_/' + status.account.id + '/' + status.id; + }, + + profileUrl(status) { + if(status.local == true) { + return status.account.url; + } + + return '/i/web/profile/_/' + status.account.id; + }, + formatCount(count) { return App.util.format.count(count); },