mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-02-22 14:10:39 +00:00
Update Profile component, add bookmark loader
This commit is contained in:
parent
4bee8397e0
commit
c8d5edc9b2
1 changed files with 40 additions and 27 deletions
|
@ -210,6 +210,16 @@
|
||||||
</infinite-loading>
|
</infinite-loading>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="mode == 'bookmarks'">
|
<div v-if="mode == 'bookmarks'">
|
||||||
|
<div v-if="bookmarksLoading">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="p-1 p-sm-2 p-md-3 d-flex justify-content-center align-items-center" style="height: 30vh;">
|
||||||
|
<img src="/img/pixelfed-icon-grey.svg" class="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
<div v-if="bookmarks.length" class="row">
|
<div v-if="bookmarks.length" class="row">
|
||||||
<div class="col-4 p-1 p-sm-2 p-md-3" v-for="(s, index) in bookmarks">
|
<div class="col-4 p-1 p-sm-2 p-md-3" v-for="(s, index) in bookmarks">
|
||||||
<a class="card info-overlay card-md-border-0" :href="s.url">
|
<a class="card info-overlay card-md-border-0" :href="s.url">
|
||||||
|
@ -242,6 +252,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div v-if="mode == 'collections'">
|
<div v-if="mode == 'collections'">
|
||||||
<div v-if="collections.length" class="row">
|
<div v-if="collections.length" class="row">
|
||||||
<div class="col-4 p-1 p-sm-2 p-md-3" v-for="(c, index) in collections">
|
<div class="col-4 p-1 p-sm-2 p-md-3" v-for="(c, index) in collections">
|
||||||
|
@ -641,6 +652,7 @@
|
||||||
followingModalSearch: null,
|
followingModalSearch: null,
|
||||||
followingModalSearchCache: null,
|
followingModalSearchCache: null,
|
||||||
followingModalTab: 'following',
|
followingModalTab: 'following',
|
||||||
|
bookmarksLoading: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeMount() {
|
beforeMount() {
|
||||||
|
@ -789,7 +801,8 @@
|
||||||
if(this.mode == 'bookmarks' && this.bookmarks.length == 0) {
|
if(this.mode == 'bookmarks' && this.bookmarks.length == 0) {
|
||||||
axios.get('/api/local/bookmarks')
|
axios.get('/api/local/bookmarks')
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.bookmarks = res.data
|
this.bookmarks = res.data;
|
||||||
|
this.bookmarksLoading = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if(this.mode == 'collections' && this.collections.length == 0) {
|
if(this.mode == 'collections' && this.collections.length == 0) {
|
||||||
|
|
Loading…
Reference in a new issue