{#if loading}

Loading profile...

{:else if error}

Error

{error}

{:else}
{#if userProfile?.picture} Profile {:else}
{npub.slice(0, 2).toUpperCase()}
{/if}

{userProfile?.name || npub.slice(0, 16) + '...'}

{#if userProfile?.about}

{userProfile.about}

{/if}
{npub}
{#if isOwnProfile} {/if}
{#if profileTags.length > 0}

Profile Metadata

{#each profileTags as tag}
{tag.name}:
{#each tag.values as value, index}
{#if tag.name === 'website'} {value} {:else if tag.name === 'nip05'} {value} {#if tag.verified && tag.verified[index]} Verified {/if} {:else} {value} {/if}
{/each}
{/each}
{/if} {#if paymentTargets.length > 0}

Payment Methods

{#each sortedPaymentTargets as target}
{getDisplayAddress(target.payto)}
{#if target.type === 'lightning'} {/if}
{/each}
{/if}
{#if activeTab === 'repos'}
{#if repos.length === 0}

No repositories found

{:else} {#if ownedRepos.length > 0}

Repositories I Own

{#each ownedRepos as event} {@const repoId = getRepoId(event)}
goto(`/repos/${npub}/${repoId}`)} onkeydown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); goto(`/repos/${npub}/${repoId}`); } }} >

{getRepoName(event)}

{#if getRepoDescription(event)}

{getRepoDescription(event)}

{/if}
{/each}
{/if} {#if maintainedRepos.length > 0}

Repositories I Maintain

{#each maintainedRepos as event} {@const repoId = getRepoId(event)}
goto(`/repos/${npub}/${repoId}`)} onkeydown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); goto(`/repos/${npub}/${repoId}`); } }} >

{getRepoName(event)}

{#if getRepoDescription(event)}

{getRepoDescription(event)}

{/if}
{/each}
{/if} {#if favoriteRepos.length > 0}

Favorite Repositories

{#each favoriteRepos as event} {@const repoId = getRepoId(event)}
goto(`/repos/${npub}/${repoId}`)} onkeydown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); goto(`/repos/${npub}/${repoId}`); } }} >

{getRepoName(event)}

{#if getRepoDescription(event)}

{getRepoDescription(event)}

{/if}
{/each}
{/if} {/if}
{:else if activeTab === 'messages'}

Public Messages

{#if viewerPubkeyHex && !isOwnProfile} {/if}
{#if loadingMessages}

Loading messages...

{:else if messages.length === 0}

No messages found

{:else}
{#each messages as message} {@const isFromViewer = viewerPubkeyHex !== null && message.pubkey === viewerPubkeyHex} {@const isToViewer = viewerPubkeyHex !== null && getMessageRecipients(message).includes(viewerPubkeyHex)}
From: {#if getMessageRecipients(message).length > 0} To: {#each getMessageRecipients(message) as recipientPubkey} {/each} {/if}
{formatMessageTime(message.created_at)}
{message.content}
{/each}
{/if}
{:else if activeTab === 'activity'}

Activity

{#if loadingActivity}

Loading activity...

{:else if activityEvents.length === 0}

No activity found

{:else}
{#each activityEvents as event}

{getEventContext(event)}

{/each}
{/if}
{/if}
{/if}
{#if showSendMessageDialog} {/if}