Skip to content

Commit

Permalink
problem: usernames are not as helpful as they could be
Browse files Browse the repository at this point in the history
  • Loading branch information
gsovereignty committed Nov 23, 2023
1 parent 029c8b0 commit 2c7c93c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/components/comments/CommentUser.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import type {NDKUser, NDKUserProfile} from "@nostr-dev-kit/ndk";
import { ndk_profiles } from "$lib/stores/event_sources/relays/profiles";
import { InlineLoading } from "carbon-components-svelte";
import { Launch } from "carbon-icons-svelte";
export let pubkey: string;
export let large:boolean = false;
Expand Down Expand Up @@ -34,5 +35,5 @@
</script>


{#if !gotOne}<InlineLoading description="Fetching NIP05 Data"/>{:else}<span style="color: #fb923c">{userProfile?.name || userProfile?.displayName}</span>{/if}
{#if !gotOne}<InlineLoading description="Fetching NIP05 Data"/>{:else}<span style="color: #fb923c">{userProfile?.name || userProfile?.displayName}</span><a href={"https://primal.net/p/"+commentUser.npub}><Launch /></a>{/if}

8 changes: 2 additions & 6 deletions src/routes/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import menu from "./menu";
import { defaultRelays, profileRelays, testnet } from "../settings";
import LoginNip07Button from "../components/elements/LoginNIP07Button.svelte";
import CommentUser from "../components/comments/CommentUser.svelte";
const size = breakpointObserver();
const larger = size.largerThan("md");
Expand Down Expand Up @@ -103,12 +104,7 @@
{/if}

{#if $currentUser}
{#if $currentUser.profile?.name}
{$currentUser.profile?.name}
{:else}
Fetching profile....
{$currentUser.npub.substring(0, 12)}
{/if}
<CommentUser pubkey={$currentUser.pubkey} />
{/if}
<HeaderPanelDivider>CONSENSUS LEAD?</HeaderPanelDivider>
{$weHaveTheLead}
Expand Down
4 changes: 2 additions & 2 deletions src/routes/problems/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,13 @@
<h5>People</h5>
<div style="display: flex; align-items: center; text-align: center; margin-top: 10px">
<UserAvatarFilledAlt size={32}/>
<p><CommentUser large pubkey={problem.CreatedBy} /></p> <span style="color: #94a3b8"> (creator)</span>
<p><CommentUser large pubkey={problem.CreatedBy} /></p> <span style="color: #94a3b8"> <Tag type="teal">creator</Tag></span>
</div>

{#if problem?.Status === "claimed" || problem?.Status === "patched"}
<div style="display: flex; align-items: center; text-align: center; margin-top: 10px">
<UserAvatarFilledAlt size={32}/>
<p><CommentUser large pubkey={problem.ClaimedBy} /></p> <span style="color: #94a3b8"> (contributor)</span>
<p><CommentUser large pubkey={problem.ClaimedBy} /></p> <span style="color: #94a3b8"> <Tag type="magenta">contributor</Tag></span>
</div>
{/if}

Expand Down

0 comments on commit 2c7c93c

Please sign in to comment.