`;
-
- // Profile Picture at the top
- // Check if the user has uploaded a valid profile picture
- const profilePicture = window.user?.profile?.picture && window.user.profile.picture !== ''
- ? window.user.profile.picture
- : window.icons['profile.svg']; // Fallback to default profile.svg
-
- h += `
`;
+ h += `
`;
+ h += `
`;
+ h += `
`;
h += `
`;
- h += `
`;
-
- h += `
`;
- // Change Profile Picture Button
- h += ``;
- // Delete Profile Picture Button
- h += ``;
- h += `
`;
// change password button
if(!window.user.is_temp){
h += `
`;
@@ -166,22 +150,6 @@ export default {
});
})
- $el_window.find('.delete_Profile_Picture').on('click', async function (e) {
- // Update the profile picture in the UI (set to a default image or placeholder)
- window.user.profile.picture = window.icons['profile.svg'];
- const defaultPicture = window.icons['profile.svg'];
- $el_window.find('.profile-picture').css('background-image', `url('${html_encode(defaultPicture)}')`);
-
- // Update the profile picture displayed on the page
- $('.profile-picture').css('background-image', `url('${html_encode(defaultPicture)}')`);
- $('.profile-image').addClass('profile-image-has-picture');
-
- // update the global profile image display
- $('.profile-image').css('background-image', `url('${html_encode(defaultPicture)}')`);
- $('.profile-image').addClass('profile-image-has-picture');
-
- });
-
$el_window.on('file_opened', async function(e){
let selected_file = Array.isArray(e.detail) ? e.detail[0] : e.detail;
// set profile picture
@@ -210,4 +178,4 @@ export default {
}
})
},
-};
+};
\ No newline at end of file