mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-19 13:01:26 +00:00
Merge pull request #832 from pixelfed/frontend-ui-refactor
Frontend ui refactor
This commit is contained in:
commit
b10cf02ef3
3 changed files with 4 additions and 2 deletions
BIN
public/js/timeline.js
vendored
BIN
public/js/timeline.js
vendored
Binary file not shown.
Binary file not shown.
|
@ -138,7 +138,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="modes.infinite == false && !loading && feed.length > 0" class="pagination d-none">
|
<div v-if="modes.infinite == false && !loading && feed.length > 0" class="pagination">
|
||||||
<p class="btn btn-outline-secondary font-weight-bold btn-block" v-on:click="loadMore">Load more posts</p>
|
<p class="btn btn-outline-secondary font-weight-bold btn-block" v-on:click="loadMore">Load more posts</p>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!loading && scope == 'home' && feed.length == 0">
|
<div v-if="!loading && scope == 'home' && feed.length == 0">
|
||||||
|
@ -421,10 +421,11 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
loadMore() {
|
loadMore(event) {
|
||||||
let homeTimeline = '/api/v1/timelines/home';
|
let homeTimeline = '/api/v1/timelines/home';
|
||||||
let localTimeline = '/api/v1/timelines/public';
|
let localTimeline = '/api/v1/timelines/public';
|
||||||
let apiUrl = this.scope == 'home' ? homeTimeline : localTimeline;
|
let apiUrl = this.scope == 'home' ? homeTimeline : localTimeline;
|
||||||
|
event.target.innerText = 'Loading...';
|
||||||
axios.get(apiUrl, {
|
axios.get(apiUrl, {
|
||||||
params: {
|
params: {
|
||||||
page: this.page,
|
page: this.page,
|
||||||
|
@ -440,6 +441,7 @@
|
||||||
}
|
}
|
||||||
this.page += 1;
|
this.page += 1;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
event.target.innerText = 'Load more posts';
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue