1
0
Fork 0

Merge pull request #2845 from pixelfed/staging

Update Timeline.vue, fix comment button
This commit is contained in:
daniel 2021-07-07 01:49:07 -06:00 committed by GitHub
commit 5378031f8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 65 additions and 6 deletions

View File

@ -50,6 +50,7 @@
- Updated status views, remove like counts from status embed. ([1a2e41b1](https://github.com/pixelfed/pixelfed/commit/1a2e41b1)) - 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 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 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/)) - ([](https://github.com/pixelfed/pixelfed/commit/))
## [v0.11.0 (2021-06-01)](https://github.com/pixelfed/pixelfed/compare/v0.10.10...v0.11.0) ## [v0.11.0 (2021-06-01)](https://github.com/pixelfed/pixelfed/compare/v0.10.10...v0.11.0)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -21,7 +21,7 @@
"/js/hashtag.js": "/js/hashtag.js?id=8137c9aeac44cd972dbc", "/js/hashtag.js": "/js/hashtag.js?id=8137c9aeac44cd972dbc",
"/js/loops.js": "/js/loops.js?id=ae34b77c4cfe1824f5a0", "/js/loops.js": "/js/loops.js?id=ae34b77c4cfe1824f5a0",
"/js/mode-dot.js": "/js/mode-dot.js?id=dd9c87024fbaa8e75ac4", "/js/mode-dot.js": "/js/mode-dot.js?id=dd9c87024fbaa8e75ac4",
"/js/profile.js": "/js/profile.js?id=82fc514b20e7c5af5b97", "/js/profile.js": "/js/profile.js?id=72507e54732e3962f6b6",
"/js/profile-directory.js": "/js/profile-directory.js?id=886f17ad7ab4b2e08019", "/js/profile-directory.js": "/js/profile-directory.js?id=886f17ad7ab4b2e08019",
"/js/quill.js": "/js/quill.js?id=866b31b9b9540305751d", "/js/quill.js": "/js/quill.js?id=866b31b9b9540305751d",
"/js/rempos.js": "/js/rempos.js?id=a3b1f802e293977dbc60", "/js/rempos.js": "/js/rempos.js?id=a3b1f802e293977dbc60",
@ -30,5 +30,5 @@
"/js/status.js": "/js/status.js?id=160dd40e8625b8fc302e", "/js/status.js": "/js/status.js?id=160dd40e8625b8fc302e",
"/js/story-compose.js": "/js/story-compose.js?id=b16bcf2adad9651735e1", "/js/story-compose.js": "/js/story-compose.js?id=b16bcf2adad9651735e1",
"/js/theme-monokai.js": "/js/theme-monokai.js?id=8842103833ba4861bcfa", "/js/theme-monokai.js": "/js/theme-monokai.js?id=8842103833ba4861bcfa",
"/js/timeline.js": "/js/timeline.js?id=bbeb7ea9d80d02acfbb1" "/js/timeline.js": "/js/timeline.js?id=a8569cb679f77be5a203"
} }

View File

@ -424,7 +424,7 @@
<div class="list-group-item border-0 py-1" v-for="(user, index) in following" :key="'following_'+index"> <div class="list-group-item border-0 py-1" v-for="(user, index) in following" :key="'following_'+index">
<div class="media"> <div class="media">
<a :href="profileUrlRedirect(user)"> <a :href="profileUrlRedirect(user)">
<img class="mr-3 rounded-circle box-shadow" :src="user.avatar" :alt="user.username + 's avatar'" width="30px" loading="lazy"> <img class="mr-3 rounded-circle box-shadow" :src="user.avatar" :alt="user.username + 's avatar'" width="30px" loading="lazy" onerror="this.onerror=null;this.src='/storage/avatars/default.png?v=0'">
</a> </a>
<div class="media-body text-truncate"> <div class="media-body text-truncate">
<p class="mb-0" style="font-size: 14px"> <p class="mb-0" style="font-size: 14px">
@ -471,7 +471,7 @@
<div class="list-group-item border-0 py-1" v-for="(user, index) in followers" :key="'follower_'+index"> <div class="list-group-item border-0 py-1" v-for="(user, index) in followers" :key="'follower_'+index">
<div class="media mb-0"> <div class="media mb-0">
<a :href="profileUrlRedirect(user)"> <a :href="profileUrlRedirect(user)">
<img class="mr-3 rounded-circle box-shadow" :src="user.avatar" :alt="user.username + 's avatar'" width="30px" height="30px" loading="lazy"> <img class="mr-3 rounded-circle box-shadow" :src="user.avatar" :alt="user.username + 's avatar'" width="30px" height="30px" loading="lazy" onerror="this.onerror=null;this.src='/storage/avatars/default.png?v=0'">
</a> </a>
<div class="media-body mb-0"> <div class="media-body mb-0">
<p class="mb-0" style="font-size: 14px"> <p class="mb-0" style="font-size: 14px">

View File

@ -942,6 +942,64 @@
return; 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) { formatCount(count) {
return App.util.format.count(count); return App.util.format.count(count);
}, },