2022-10-28 22:56:04 +02:00
|
|
|
if (typeof email !== "undefined" && typeof username !== "undefined") {
|
2022-10-28 22:40:02 +02:00
|
|
|
Vue.createApp({
|
|
|
|
data() {
|
|
|
|
return {
|
2022-10-28 22:56:04 +02:00
|
|
|
// eslint-disable-next-line no-undef
|
2022-10-28 22:40:02 +02:00
|
|
|
email,
|
2022-10-28 22:56:04 +02:00
|
|
|
// eslint-disable-next-line no-undef
|
2022-10-28 22:40:02 +02:00
|
|
|
username,
|
2022-10-28 22:56:04 +02:00
|
|
|
oldPassword: "",
|
|
|
|
password: "",
|
|
|
|
passwordConfirm: "",
|
2022-10-28 22:40:02 +02:00
|
|
|
loading: false,
|
2022-10-28 22:56:04 +02:00
|
|
|
};
|
2022-10-28 22:40:02 +02:00
|
|
|
},
|
|
|
|
methods: {
|
2022-10-28 22:56:04 +02:00
|
|
|
// eslint-disable-next-line no-unused-vars
|
2022-10-28 22:40:02 +02:00
|
|
|
async updateProfil(event) {
|
|
|
|
// try {
|
|
|
|
// if ( this.password !== this.passwordConfirm ) {
|
|
|
|
// throw "La confirnation du mot de passe ne correspond pas";
|
|
|
|
// }
|
|
|
|
// } catch(err) {
|
|
|
|
// event.preventDefault();
|
|
|
|
// showToastr(err);
|
|
|
|
// }
|
|
|
|
},
|
2022-10-28 22:56:04 +02:00
|
|
|
},
|
|
|
|
}).mount("#mon-compte");
|
|
|
|
}
|