Added images
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
Personnaliser votre profil
|
||||
</h1>
|
||||
|
||||
<ProfileBanner :user="currentUser"></ProfileBanner>
|
||||
<ProfileBanner @updateProfilePicture="updateProfilePicture" @updateBannerPicture="updateBannerPicture" :user="currentUser"></ProfileBanner>
|
||||
<AboutYou :user="currentUser"></AboutYou>
|
||||
<SocialLinks :social-networks="currentUser.socialNetworks"></SocialLinks>
|
||||
<SocialLinks :user="currentUser" @updateWebsiteIcon="updateWebsiteIcon"></SocialLinks>
|
||||
|
||||
<div class="sticky inset-x-0 bottom-0 flex justify-center px-4 pb-4">
|
||||
<div class="flex space-x-2">
|
||||
@@ -46,7 +46,7 @@ import {useClient} from "@/plugins/api.js";
|
||||
const userStore = useUserStore();
|
||||
const client = useClient();
|
||||
|
||||
const currentUser = ref(MyUserModel)
|
||||
const currentUser = ref(MyUserModel);
|
||||
const snackbar = ref(false);
|
||||
|
||||
onBeforeMount( () => {
|
||||
@@ -57,9 +57,25 @@ onBeforeMount( () => {
|
||||
}
|
||||
})
|
||||
|
||||
const profilePicture = ref(null);
|
||||
const bannerPicture = ref(null);
|
||||
const websiteIcon = ref(null);
|
||||
|
||||
const updateProfilePicture = (file) => {
|
||||
profilePicture.value = file;
|
||||
};
|
||||
|
||||
const updateBannerPicture = (file) => {
|
||||
bannerPicture.value = file;
|
||||
};
|
||||
|
||||
const updateWebsiteIcon = (file) => {
|
||||
websiteIcon.value = file;
|
||||
};
|
||||
|
||||
async function saveForm(){
|
||||
snackbar.value = true;
|
||||
await userStore.updateCurrentUser(client, currentUser.value);
|
||||
await userStore.updateCurrentUser(client, currentUser.value, profilePicture.value, bannerPicture.value, websiteIcon.value);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user