mirror of https://github.com/pixelfed/pixelfed.git
Update Profile.vue component
This commit is contained in:
parent
9003dabbba
commit
424b6bad16
|
@ -76,7 +76,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- DESKTOP PROFILE PICTURE -->
|
<!-- DESKTOP PROFILE PICTURE -->
|
||||||
<div class="d-none d-md-block pb-5">
|
<div class="d-none d-md-block pb-3">
|
||||||
<div v-if="hasStory" class="has-story-lg cursor-pointer shadow-sm" @click="storyRedirect()">
|
<div v-if="hasStory" class="has-story-lg cursor-pointer shadow-sm" @click="storyRedirect()">
|
||||||
<img :alt="profileUsername + '\'s profile picture'" class="rounded-circle box-shadow cursor-pointer" :src="profile.avatar" width="150px" height="150px">
|
<img :alt="profileUsername + '\'s profile picture'" class="rounded-circle box-shadow cursor-pointer" :src="profile.avatar" width="150px" height="150px">
|
||||||
</div>
|
</div>
|
||||||
|
@ -641,6 +641,12 @@
|
||||||
if(document.querySelectorAll('body')[0].classList.contains('loggedIn') == true) {
|
if(document.querySelectorAll('body')[0].classList.contains('loggedIn') == true) {
|
||||||
axios.get('/api/pixelfed/v1/accounts/verify_credentials').then(res => {
|
axios.get('/api/pixelfed/v1/accounts/verify_credentials').then(res => {
|
||||||
this.user = res.data;
|
this.user = res.data;
|
||||||
|
if(res.data.id == this.profileId || this.relationship.following == true) {
|
||||||
|
axios.get('/api/stories/v1/exists/' + this.profileId)
|
||||||
|
.then(res => {
|
||||||
|
this.hasStory = res.data == true;
|
||||||
|
})
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if(window.outerWidth < 576) {
|
if(window.outerWidth < 576) {
|
||||||
|
@ -659,10 +665,7 @@
|
||||||
this.profile = res.data;
|
this.profile = res.data;
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.fetchPosts();
|
this.fetchPosts();
|
||||||
axios.get('/api/stories/v1/exists/' + this.profileId)
|
|
||||||
.then(res => {
|
|
||||||
this.hasStory = res.data == true;
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue