{data.user?.displayName || data.user?.username} - User Profile

{#if data.user?.isBanned} {:else if data.user?.roles && (hasRole(data.user.roles, roles.Admin) || hasRole(data.user.roles, roles.Moderator))} {:else} {/if} {data.user?.displayName || data.user?.username}

{#if data.user?.displayName && data.user?.displayName !== data.user?.username}
{data.user?.username}
{/if}
Joined {extractDateFromUUIDv7(data.user?.uuid)?.toLocaleDateString() ?? 'Unknown'}
{data.user?.uid}
{#if isOwner && data.user?.lastLogin}
Last login {dateToRelativeString(new Date(data.user?.lastLogin), true, false, now)}
{/if}
{#if !isOwner && !$user?.isBanned && $user && (!hasRole(data.user.roles, roles.Admin) || !hasRole(data.user.roles, roles.Moderator))}
openModal({ mode: 'report', title: 'Report User', reportTarget: 'user', reportTargetId: data.user?.uuid || '', reportSiteKey: reportSiteKey, confirmButtonText: 'Submit Report', cancelValue: null })} >
{/if}
{#if isOwner || ($user?.roles && (hasRole($user.roles, roles.Admin) || hasRole($user.roles, roles.Moderator)))} {/if} {#if reportsSubmitted} {/if} {#if reportsTarget} {/if}
{#if loading}
{/if} {#if activeTab === 'settings'}
{#if isOwner} {/if} {#if $user?.roles && hasRole($user.roles, roles.Admin)} {/if} {#if isOwner} {/if}
{#if activeSubTab === 'settings:general'}

Display Name

{isOwner ? 'Your display name is shown publicly on your profile and pastes.' : "This user's display name is shown publicly on their profile and pastes."}

{#if isEditingDisplayName}
{ if (e.key === 'Enter') saveDisplayName(); else if (e.key === 'Escape') cancelEditDisplayName(); }} />
{:else} {data.user?.displayName || data.user?.username} {/if}
{#if isOwner}

Email

Used for account verification and security notifications.

{#if emailError}
{emailError}
{/if} {#if emailMessage}
{emailMessage}
{/if}
{#if isEditingEmail}
{ if (e.key === 'Enter') changeEmail(); else if (e.key === 'Escape') { isEditingEmail = false; editEmailValue = ''; } }} />
{:else}
{data.user?.email || 'No email set'} {data.user?.email ? data.user?.emailVerified ? 'Verified' : 'Not verified' : 'Add an email to enable verification'}
{#if data.user?.email && !data.user?.emailVerified} {/if}
{/if}
{/if} {:else if isOwner && activeSubTab === 'settings:security'}
Two-Factor Authentication {totpEnabled ? 'Enabled' : 'Disabled'}
Change Password Use your current password and choose a new one.
{#if passwordError}
{passwordError}
{/if} {#if passwordMessage}
{passwordMessage}
{/if}
(passwordFocused = true)} onblur={() => (passwordFocused = false)} class="w-full rounded border border-neutral-700 bg-neutral-900 px-3 py-2 text-neutral-200 transition-colors outline-none focus:border-neutral-500" /> {#if passwordFocused}
  • {#if passwordChecks.minLength} {:else} {/if} At least 8 characters
  • {#if passwordChecks.maxLength} {:else} {/if} No more than 128 characters
  • {#if passwordChecks.upper} {:else} {/if} At least one uppercase letter
  • {#if passwordChecks.lower} {:else} {/if} At least one lowercase letter
  • {#if passwordChecks.number} {:else} {/if} At least one number
{/if}
{#if isOwner}

Delete Account

Permanently delete this account and all associated data.

{/if} {:else if $user?.roles && hasRole($user.roles, roles.Admin) && activeSubTab === 'settings:admin'}
User Roles {(() => { let count = 0; if (data.user?.roles) { if (hasRole(data.user.roles, roles.User)) count++; if (hasRole(data.user.roles, roles.Moderator)) count++; if (hasRole(data.user.roles, roles.Admin)) count++; } return count; })()} roles assigned
Password Reset Link Send the user a reset link or copy one for manual delivery.
{#if passwordResetLinkError}
{passwordResetLinkError}
{/if} {#if passwordResetLinkMessage}
{passwordResetLinkMessage}
{/if} {#if passwordResetLinkValue}
{passwordResetLinkValue}
{/if}
{#if !isOwner && data.user?.roles && !hasRole(data.user.roles, roles.Admin)}

Delete Account

Permanently delete this account and all associated data.

{/if} {:else if isOwner && activeSubTab === 'settings:developer'}

API Keys ({apiKeys.length}/10)

Manage API keys for accessing Sharpbin programmatically.

{#if apiKeyError}
{apiKeyError}
{/if}
{#if isCreatingApiKey}
{:else} {/if}
{#if newApiKeyValue}
API Key Created

Please copy your API key now. You won't be able to see it again.

{newApiKeyValue}
{/if}
{#if apiKeys.length !== 0} {#each apiKeys as key (key.uuid)}
{key.name}
Created: {new Date(key.createdAt).toLocaleDateString()} Last used: {key.lastUsedAt ? dateToRelativeString(new Date(key.lastUsedAt), true, false, now) : 'Never'}
{/each} {/if}
{/if}
{:else if activeTab === 'pastes'}
{#if pastes && pastes.length > 0} {#each pastes .slice() .sort((a, b) => b.uuid.localeCompare(a.uuid)) as paste (paste.uuid)} {/each} {:else}

{isOwner ? 'You have' : 'This user has'} not created any pastes yet.

{/if}
{#if pagination.totalPages && pagination.totalPages > 1}
Page {currentPage} of {pagination.totalPages}
{/if} {:else if activeTab === 'reportsSubmitted' && reportsSubmitted && reportsSubmitted.reports.length > 0}
{#each reportsSubmitted.reports as report (report.reportID)}
goto(resolve(`/report/${report.reportID}`))} onkeydown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); goto(resolve(`/report/${report.reportID}`)); } }} >
Report #{report.reportID} {reportTypeLabels[report.type] ?? 'Other'} · {reportStatusLabels[report.status] ?? 'Open'}
{reportTargetLabels[report.targetType] ?? 'Unknown'} {#if report.pasteId} {report.pasteTitle !== '' ? report.pasteTitle : report.pasteId} {/if} {#if report.userUUID} {#if report.targetUsername} {report.targetDisplayName || report.targetUsername} {:else} {report.userUUID} {/if} {/if} Created {new Date(report.createdAt * 1000).toLocaleString()}
{#if report.description}

{report.description}

{/if}
{/each}
{:else if activeTab === 'reportsTarget' && reportsTarget && reportsTarget.reports.length > 0}
{#each reportsTarget.reports as report (report.reportID)}
goto(resolve(`/report/${report.reportID}`))} onkeydown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); goto(resolve(`/report/${report.reportID}`)); } }} >
Report #{report.reportID} {reportTypeLabels[report.type] ?? 'Other'} · {reportStatusLabels[report.status] ?? 'Open'}
{reportTargetLabels[report.targetType] ?? 'Unknown'} {#if report.reporterUsername} {report.reporterDisplayName || report.reporterUsername} {:else} {report.reporterUUID} {/if} {#if report.pastePID} {report.pasteTitle ? report.pasteTitle : `Paste #${report.pastePID}`} {/if} {#if report.userUUID} {#if report.targetUsername} {report.targetDisplayName || report.targetUsername} {:else} {report.userUUID} {/if} {/if} Created {new Date(report.createdAt * 1000).toLocaleString()}
{#if report.description}

{report.description}

{/if}
{/each}
{:else}

{#if activeTab === 'reportsSubmitted'} {isOwner ? 'You have' : 'This user has'} not submitted any reports. {:else if activeTab === 'reportsTarget'} {isOwner ? 'You have' : 'This user has'} not been reported. {:else} No reports found. {/if}

{/if}