forked from mirror/pixelfed
commit
1ede2ef8c1
|
@ -16,6 +16,7 @@
|
||||||
- Updated StoryController, fix expiration time bug. ([39e57f95](https://github.com/pixelfed/pixelfed/commit/39e57f95))
|
- Updated StoryController, fix expiration time bug. ([39e57f95](https://github.com/pixelfed/pixelfed/commit/39e57f95))
|
||||||
- Updated Profile component, fix remote urls. ([6e56dbed](https://github.com/pixelfed/pixelfed/commit/6e56dbed))
|
- Updated Profile component, fix remote urls. ([6e56dbed](https://github.com/pixelfed/pixelfed/commit/6e56dbed))
|
||||||
- Updated verify email screen, add contact admin link. ([f37952d6](https://github.com/pixelfed/pixelfed/commit/f37952d6))
|
- Updated verify email screen, add contact admin link. ([f37952d6](https://github.com/pixelfed/pixelfed/commit/f37952d6))
|
||||||
|
- Updated RemoteProfile component, implement pagination. ([02b04a4b](https://github.com/pixelfed/pixelfed/commit/02b04a4b))
|
||||||
- ([](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
|
@ -26,7 +26,7 @@
|
||||||
"/js/profile-directory.js": "/js/profile-directory.js?id=e63d5f2c6f2d5710a8bd",
|
"/js/profile-directory.js": "/js/profile-directory.js?id=e63d5f2c6f2d5710a8bd",
|
||||||
"/js/quill.js": "/js/quill.js?id=4769f11fc9a6c32dde50",
|
"/js/quill.js": "/js/quill.js?id=4769f11fc9a6c32dde50",
|
||||||
"/js/rempos.js": "/js/rempos.js?id=0bbc655fe5c21a01626e",
|
"/js/rempos.js": "/js/rempos.js?id=0bbc655fe5c21a01626e",
|
||||||
"/js/rempro.js": "/js/rempro.js?id=d0a0a0cdc8f94bb13171",
|
"/js/rempro.js": "/js/rempro.js?id=802ab1bd700e9d0d0723",
|
||||||
"/js/search.js": "/js/search.js?id=33a848ea20efb0c4f71f",
|
"/js/search.js": "/js/search.js?id=33a848ea20efb0c4f71f",
|
||||||
"/js/status.js": "/js/status.js?id=ce91385c7214bfa91c29",
|
"/js/status.js": "/js/status.js?id=ce91385c7214bfa91c29",
|
||||||
"/js/story-compose.js": "/js/story-compose.js?id=e93760b2356732faecf8",
|
"/js/story-compose.js": "/js/story-compose.js?id=e93760b2356732faecf8",
|
||||||
|
|
|
@ -125,7 +125,16 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else class="col-12 mt-4">
|
<div v-else class="col-12 mt-4">
|
||||||
<p class="text-center mb-0 px-0"><button class="btn btn-outline-primary btn-block font-weight-bold">Load More</button></p>
|
<p v-if="showLoadMore" class="text-center mb-0 px-0">
|
||||||
|
<button @click="loadMorePosts()" class="btn btn-outline-primary btn-block font-weight-bold">
|
||||||
|
<span v-if="!loadingMore">Load More</span>
|
||||||
|
<span v-else>
|
||||||
|
<div class="spinner-border spinner-border-sm" role="status">
|
||||||
|
<span class="sr-only">Loading...</span>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -193,6 +202,7 @@
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: [],
|
id: [],
|
||||||
|
ids: [],
|
||||||
user: false,
|
user: false,
|
||||||
profile: {},
|
profile: {},
|
||||||
feed: [],
|
feed: [],
|
||||||
|
@ -206,7 +216,9 @@
|
||||||
ctxMenuStatus: false,
|
ctxMenuStatus: false,
|
||||||
ctxMenuRelationship: false,
|
ctxMenuRelationship: false,
|
||||||
fetchingRemotePosts: false,
|
fetchingRemotePosts: false,
|
||||||
showMutualFollowers: false
|
showMutualFollowers: false,
|
||||||
|
loadingMore: false,
|
||||||
|
showLoadMore: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -277,6 +289,52 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
loadMorePosts() {
|
||||||
|
this.loadingMore = true;
|
||||||
|
let apiUrl = '/api/pixelfed/v1/accounts/' + this.profileId + '/statuses';
|
||||||
|
axios.get(apiUrl, {
|
||||||
|
params: {
|
||||||
|
only_media: true,
|
||||||
|
max_id: this.max_id,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
let data = res.data
|
||||||
|
.filter(status => this.ids.indexOf(status.id) === -1)
|
||||||
|
.filter(status => status.media_attachments.length > 0)
|
||||||
|
.map(status => {
|
||||||
|
return {
|
||||||
|
id: status.id,
|
||||||
|
caption: {
|
||||||
|
text: status.content_text,
|
||||||
|
html: status.content
|
||||||
|
},
|
||||||
|
count: {
|
||||||
|
likes: status.favourites_count,
|
||||||
|
shares: status.reblogs_count,
|
||||||
|
comments: status.reply_count
|
||||||
|
},
|
||||||
|
thumb: status.media_attachments[0].url,
|
||||||
|
media: status.media_attachments,
|
||||||
|
timestamp: status.created_at,
|
||||||
|
type: status.pf_type,
|
||||||
|
url: status.url,
|
||||||
|
sensitive: status.sensitive,
|
||||||
|
cw: status.sensitive,
|
||||||
|
spoiler_text: status.spoiler_text
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let ids = data.map(status => status.id);
|
||||||
|
this.ids.push(...ids);
|
||||||
|
this.max_id = Math.min(...ids);
|
||||||
|
this.feed.push(...data);
|
||||||
|
this.loadingMore = false;
|
||||||
|
}).catch(err => {
|
||||||
|
this.loadingMore = false;
|
||||||
|
this.showLoadMore = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
fetchRelationships() {
|
fetchRelationships() {
|
||||||
if(document.querySelectorAll('body')[0].classList.contains('loggedIn') == false) {
|
if(document.querySelectorAll('body')[0].classList.contains('loggedIn') == false) {
|
||||||
return;
|
return;
|
||||||
|
@ -509,4 +567,4 @@
|
||||||
max-width: 1050px;
|
max-width: 1050px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue