mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-29 00:10:52 +00:00
Fix user display on menu
This commit is contained in:
parent
2f869bc143
commit
8d76bb1808
@ -19,7 +19,7 @@
|
|||||||
hasNewMessages,
|
hasNewMessages,
|
||||||
hasNewNotifications,
|
hasNewNotifications,
|
||||||
sessions,
|
sessions,
|
||||||
displayProfileByPubkey,
|
userDisplay,
|
||||||
publishes,
|
publishes,
|
||||||
} from "src/engine"
|
} from "src/engine"
|
||||||
|
|
||||||
@ -220,7 +220,7 @@
|
|||||||
<Anchor class="flex items-center gap-2" on:click={() => setSubMenu("account")}>
|
<Anchor class="flex items-center gap-2" on:click={() => setSubMenu("account")}>
|
||||||
<PersonCircle class="h-10 w-10" pubkey={$pubkey} />
|
<PersonCircle class="h-10 w-10" pubkey={$pubkey} />
|
||||||
<div class="flex min-w-0 flex-col">
|
<div class="flex min-w-0 flex-col">
|
||||||
<span>@{displayProfileByPubkey($pubkey)}</span>
|
<span>@{$userDisplay}</span>
|
||||||
<PersonHandle class="text-sm" pubkey={$pubkey} />
|
<PersonHandle class="text-sm" pubkey={$pubkey} />
|
||||||
</div>
|
</div>
|
||||||
</Anchor>
|
</Anchor>
|
||||||
|
@ -103,7 +103,6 @@
|
|||||||
{:else if !isEllipsis(parsed)}
|
{:else if !isEllipsis(parsed)}
|
||||||
{renderParsed(parsed)}
|
{renderParsed(parsed)}
|
||||||
{/if}
|
{/if}
|
||||||
{" "}
|
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
{#if showMedia && extraLinks.length > 0}
|
{#if showMedia && extraLinks.length > 0}
|
||||||
|
@ -331,6 +331,11 @@ export const displayProfileByPubkey = (pk: string) => {
|
|||||||
export const deriveProfileDisplay = (pk: string) =>
|
export const deriveProfileDisplay = (pk: string) =>
|
||||||
derived(deriveProfile(pk), () => displayProfileByPubkey(pk))
|
derived(deriveProfile(pk), () => displayProfileByPubkey(pk))
|
||||||
|
|
||||||
|
export const userDisplay = derived(
|
||||||
|
[pubkey, profilesByPubkey],
|
||||||
|
([$pk, $p]) => $pk ? displayProfileByPubkey($pk) : ""
|
||||||
|
)
|
||||||
|
|
||||||
export const profilesWithName = derived(profiles, $profiles => $profiles.filter(profileHasName))
|
export const profilesWithName = derived(profiles, $profiles => $profiles.filter(profileHasName))
|
||||||
|
|
||||||
export class ProfileSearch extends SearchHelper<PublishedProfile, string> {
|
export class ProfileSearch extends SearchHelper<PublishedProfile, string> {
|
||||||
|
Loading…
Reference in New Issue
Block a user