1
0
Fork 0

Update Profile.vue component

This commit is contained in:
Daniel Supernault 2019-07-17 21:04:00 -06:00
parent 354b5144ac
commit 5623701642
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 21 additions and 3 deletions

View File

@ -328,9 +328,21 @@
</div>
</div>
<div class="col-12" v-if="mode == 'collections'">
<div class="py-5 text-center text-muted">
<p><i class="fas fa-images fa-2x"></i></p>
<p class="h2 font-weight-light pt-3">You have no collections</p>
<div v-if="collections.length" class="row">
<div class="col-4 p-0 p-sm-2 p-md-3 p-xs-1" v-for="(c, index) in collections">
<a class="card info-overlay card-md-border-0" :href="c.url">
<div class="square">
<div class="square-content" v-bind:style="'background-image: url(' + c.thumb + ');'">
</div>
</div>
</a>
</div>
</div>
<div v-else>
<div class="py-5 text-center text-muted">
<p><i class="fas fa-images fa-2x"></i></p>
<p class="h2 font-weight-light pt-3">No collections yet</p>
</div>
</div>
</div>
</div>
@ -705,6 +717,12 @@
this.bookmarks = res.data
});
}
if(this.mode == 'collections' && this.collections.length == 0) {
axios.get('/api/local/profile/collections/' + this.profileId)
.then(res => {
this.collections = res.data
});
}
},
reportProfile() {