feat: hecho tema de imagenes en perfil

> mamita como renegue
- arreglado modificar usuarios admin
- añadido subir pfp
This commit is contained in:
2025-12-08 20:52:58 -03:00
parent 5c388cfb12
commit 84106abd3d
12 changed files with 224 additions and 105 deletions

View File

@@ -18,20 +18,22 @@
let { open = $bindable(), usuario = $bindable() }: Prop = $props();
let imagen = $state(!!usuario?.profileImageUrl);
let fallback = usuario?.displayName;
let cargando = $state(false);
let error = $state('');
async function onsubmit(e: SubmitEvent) {
e.preventDefault();
cargando = true;
let ret: { displayName: string } | string = await updateUsuario({
const data = {
id: usuario?.id || '',
bio: usuario?.bio || '',
displayName: usuario?.displayName || '',
oldImageUrl: usuario?.profileImageUrl || '',
profileImage: imagen
});
profileImage: imagen,
profileImageUrl: imagen ? null : usuario?.profileImageUrl
};
console.log(data);
let ret: { displayName: string } | string = await updateUsuario(data);
if (typeof ret === 'string') {
error = ret;
} else {