Skip to content

Commit

Permalink
Fixed missing default profile image
Browse files Browse the repository at this point in the history
  • Loading branch information
elrumo committed Nov 5, 2023
1 parent d888bb8 commit ff2ca0b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
13 changes: 9 additions & 4 deletions src/components/AccountDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@
<br>
<br>
Make sure to check your spam folder if you don't receive it within the next few minutes.
{{ isReset }}

<coral-dialog-footer class="_coral-Dialog-footer m-0">
<button is="coral-button" variant="quiet" coral-close="">Cancel</button>
<button is="coral-button" @click="resetPassword" variant="default" coral-close="">Reset password</button>
</coral-dialog-footer>
</coral-dialog-content>

<coral-dialog-footer v-if="isReset">
<!-- <coral-dialog-footer v-if="isReset">
<button is="coral-button" variant="quiet" coral-close="">Cancel</button>
<button is="coral-button" @click="resetPassword" variant="default" coral-close="">Reset password</button>
</coral-dialog-footer>
</coral-dialog-footer> -->
</coral-dialog>

<div v-if="isLoading.requestUserData" class="loading-overlay">
Expand Down Expand Up @@ -330,10 +336,9 @@ export default {
})
} else{
document.getElementById("resetPasswordDialog").show()
this.isReset = true;
document.getElementById("resetPasswordDialog").show()
}
},
async requestUserData(){
Expand Down
6 changes: 4 additions & 2 deletions src/components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -494,9 +494,11 @@ export default {
...mapGetters(['getUser']),
getProfilePic(){
console.log("this.getUser.userData.profilePhoto: ", this.getUser.userData.profilePhoto);
// console.log("this.getUser.userData.profilePhoto: ", this.getUser.userData.profilePhoto);
try {
return this.getUser.userData.profilePhoto ? this.getUser.userData.profilePhoto.url : this.icons.profilePic
if(Parse.User.current()){
return Parse.User.current().get("profilePhoto") ? Parse.User.current().get("profilePhoto").url() : this.icons.profilePic
}
} catch (error) {
return this.icons.profilePic
}
Expand Down
10 changes: 5 additions & 5 deletions src/components/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -661,11 +661,11 @@ export default {
this.fetchUserAttributes()
try{
await this.fetchHomeDialog()
}catch{
console.log("loading error");
}
// try{
// await this.fetchHomeDialog()
// }catch{
// console.log("loading error");
// }
if (this.getHomeDialog.showParticles) {
let particlesImageUrl = 'https://api.macosicons.com' + this.getHomeDialog.particlesImage.data.attributes.url
Expand Down
1 change: 0 additions & 1 deletion src/views/UserProfile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ export default {
showDialog(dialog) {
let dialogEl = document.getElementById(dialog);
console.log(dialog, document.getElementById(dialog));
dialogEl.show();
},
Expand Down

1 comment on commit ff2ca0b

@vercel
Copy link

@vercel vercel bot commented on ff2ca0b Nov 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.