Mon Profil - OnePieceDle

Mon Profil

Modifie les informations de ton profil

{#if activeTab === 'profile'}
{#if data.user.image} {data.user.name {:else}
{data.user.name?.charAt(0).toUpperCase() || 'U'}
{/if}

Email

{data.user.email}

{ isLoading = true; return async ({ update }) => { isLoading = false; await update(); }; }} onsubmit={handleSubmit} class="space-y-6" >
{#if form && form.message && form.success !== true}
{form.message}
{/if} {#if showSuccess}
Profil mis à jour avec succès !
{/if}
{/if} {#if activeTab === 'password'}

Changer le mot de passe

{ isLoading = true; return async ({ update }) => { isLoading = false; oldPassword = ''; newPassword = ''; confirmPassword = ''; await update(); }; }} class="space-y-6" >
{#if form && form.message && form.success !== true}
{form.message}
{/if} {#if showSuccess}
Mot de passe changé avec succès !
{/if}
{/if} {#if activeTab === 'sessions'}

Sessions actives

{#if sessions.length === 0}

Aucune session active

{:else}
{#each sessions as sess}

{sess.userAgent || 'Appareil inconnu'}

IP: {sess.ipAddress || 'Inconnue'}

Créée: {new Date(sess.createdAt).toLocaleDateString('fr-FR', { year: 'numeric', month: 'long', day: 'numeric', hour: '2-digit', minute: '2-digit' })}

{ return async ({ update }) => { await update(); }; }} >
{/each}
{/if}
{/if}