OXYDE
{#if showNewRoom}
new room
e.key === 'Enter' && onCreateRoom()} />
{/if}
ROOMS
{#each rooms.filter((room) => room.kind !== 'direct') as room (full(room.id))} {:else}

no rooms — create one above

{/each}
DIRECT
{#each rooms.filter((room) => room.kind === 'direct') as room (full(room.id))} {:else}

no direct messages

{/each}
CONTACTS
{#if showAddContact}
find people
e.key === 'Enter' && runUserSearch()} />
2+ characters
{#if contactErr}

{contactErr}

{/if} {#if searchResults.length > 0}
{#each searchResults as result (full(result.id))}
{result.username[0]?.toUpperCase() ?? '?'} {result.username}
{#if activeRoom && activeRoom.kind !== 'direct'} {/if}
{/each}
{/if} {/if} {#if contacts.length > 0}
{#each contacts as c (full(c.id))}
{c.username}
{/each}
{/if} {#if showEditProfile}
e.key === 'Enter' && submitProfile()} onkeyup={(e) => e.key === 'Escape' && (showEditProfile = false)} /> e.key === 'Enter' && submitProfile()} onkeyup={(e) => e.key === 'Escape' && (showEditProfile = false)} /> {#if profileErr}

{profileErr}

{/if}
{/if}