You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.
I noticed that there is an avatar-placeholder in the main page of homebox that point to the /main page. It would be nice to have the possibility to upload a custom profile image to show instead of the default grey circle. What do you think?
I never used Vue, but I try to start with some minor changes in default.vue file:
And finally I would create somewhere a method to handle the image upload and store it in the component's data when the user selects an image.
Maybe something like this:
data() {
return {
userImage: null, // Store the uploaded image data
};
},
methods: {
handleImageUpload(event) {
const file = event.target.files[0];
// Ensure the file is an image
if (file && file.type.startsWith('image/')) {
const reader = new FileReader();
reader.onload = () => {
this.userImage = reader.result; // Store the uploaded image
};
reader.readAsDataURL(file);
}
},
},
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi guys,
I noticed that there is an
avatar-placeholder
in the main page ofhomebox
that point to the/main
page. It would be nice to have the possibility to upload a custom profile image to show instead of the default grey circle. What do you think?I never used Vue, but I try to start with some minor changes in default.vue file:
Then I would add a button in the
Profile
section (next to theGenerate Password
button):And finally I would create somewhere a method to handle the image upload and store it in the component's data when the user selects an image.
Maybe something like this:
cc @hay-kot
Beta Was this translation helpful? Give feedback.
All reactions