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

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

{#if userProfile?.about}

{userProfile.about}

{/if}

npub: {npub}

{#if getForwardingPubkey()} {/if}
{#if error}
Error: {error}
{/if} {#if loading}
Loading profile...
{:else}
{#if activeTab === 'repos'}

Repositories ({repos.length})

{#if repos.length === 0}
No repositories found
{:else}
{#each repos as event}
goto(`/repos/${npub}/${getRepoId(event)}`)} onkeydown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); goto(`/repos/${npub}/${getRepoId(event)}`); } }} style="cursor: pointer;">

{getRepoName(event)}

{#if getRepoDescription(event)}

{getRepoDescription(event)}

{/if}
{new Date(event.created_at * 1000).toLocaleDateString()}
{/each}
{/if}
{/if} {#if activeTab === 'messages'}

Public Messages

{#if viewerPubkeyHex && viewerPubkeyHex !== userPubkey} {/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)} {@const isFromUser = userPubkey !== null && message.pubkey === userPubkey} {@const isToUser = userPubkey !== null && getMessageRecipients(message).includes(userPubkey)}
{formatMessageTime(message.created_at)}
{#if getMessageRecipients(message).length > 0} To: {#each getMessageRecipients(message) as recipientPubkey} {/each} {/if}
{message.content}
{/each}
{/if}
{/if} {/if}
{#if showSendMessageDialog} {/if}