remove nip05 from all ProfileImage rows

This commit is contained in:
Martti Malmi 2023-12-07 18:46:08 +02:00
parent f5e84c3f8a
commit fb29d330fc
8 changed files with 5 additions and 23 deletions

View File

@ -30,6 +30,5 @@
"wss://relay.snort.social/": { "read": true, "write": true },
"wss://nostr.wine/": { "read": true, "write": false },
"wss://eden.nostr.land/": { "read": true, "write": false }
},
"showNip05InNotes": true
}
}

View File

@ -30,6 +30,5 @@
"wss://eden.nostr.land/": { "read": true, "write": false },
"wss://relay.nostr.band/": { "read": true, "write": true },
"wss://relay.damus.io/": { "read": true, "write": true }
},
"showNip05InNotes": false
}
}

View File

@ -72,7 +72,6 @@ declare const CONFIG: {
eventLinkPrefix: NostrPrefix;
profileLinkPrefix: NostrPrefix;
defaultRelays: Record<string, RelaySettings>;
showNip05InNotes: boolean;
};
/**

View File

@ -10,12 +10,5 @@ export function ChatParticipantProfile({ participant }: { participant: ChatParti
if (participant.id === publicKey) {
return <NoteToSelf className="grow" />;
}
return (
<ProfileImage
showNip05={false}
pubkey={participant.id}
className="grow"
profile={participant.profile as MetadataCache}
/>
);
return <ProfileImage pubkey={participant.id} className="grow" profile={participant.profile as MetadataCache} />;
}

View File

@ -335,7 +335,6 @@ export function NoteInner(props: NoteProps) {
pubkey={ev.pubkey}
subHeader={replyTag() ?? undefined}
link={opt?.canClick === undefined ? undefined : ""}
showNip05={CONFIG.showNip05InNotes}
/>
<div className="info">
{props.context}

View File

@ -10,7 +10,7 @@ export default function ShortNote({ event }: { event: TaggedNostrEvent }) {
return (
<Link to={`/${NostrLink.fromEvent(event).encode(CONFIG.eventLinkPrefix)}`} className="flex flex-col">
<div className="flex flex-row justify-between">
<ProfileImage pubkey={event.pubkey} size={32} showNip05={false} />
<ProfileImage pubkey={event.pubkey} size={32} />
<NoteTime from={event.created_at * 1000} />
</div>
<div className="ml-10">

View File

@ -49,7 +49,7 @@ export function ProfileCard({
align="end">
<div className="flex flex-col g8">
<div className="flex justify-between">
<ProfileImage pubkey={pubkey} profile={user} showProfileCard={false} link="" showNip05={false} />
<ProfileImage pubkey={pubkey} profile={user} showProfileCard={false} link="" />
<div className="flex g8">
{/*<button type="button" onClick={() => {
LoginStore.loginWithPubkey(pubkey, LoginSessionType.PublicKey, undefined, undefined, undefined, true);

View File

@ -6,7 +6,6 @@ import { useUserProfile } from "@snort/system-react";
import classNames from "classnames";
import Avatar from "@/Element/User/Avatar";
import Nip05 from "@/Element/User/Nip05";
import DisplayName from "./DisplayName";
import { ProfileLink } from "./ProfileLink";
import { ProfileCard } from "./ProfileCard";
@ -20,7 +19,6 @@ export interface ProfileImageProps {
link?: string;
defaultNip?: string;
verifyNip?: boolean;
showNip05?: boolean;
overrideUsername?: string;
profile?: UserMetadata;
size?: number;
@ -37,9 +35,6 @@ export default function ProfileImage({
showUsername = true,
className,
link,
defaultNip,
verifyNip,
showNip05 = true,
overrideUsername,
profile,
size,
@ -50,7 +45,6 @@ export default function ProfileImage({
showProfileCard = true,
}: ProfileImageProps) {
const user = useUserProfile(profile ? "" : pubkey) ?? profile;
const nip05 = defaultNip ? defaultNip : user?.nip05;
const [isHovering, setIsHovering] = useState(false);
const hoverTimeoutRef = useRef<NodeJS.Timeout | null>(null);
@ -96,7 +90,6 @@ export default function ProfileImage({
<div className="f-ellipsis">
<div className="flex g4 username">
{overrideUsername ? overrideUsername : <DisplayName pubkey={pubkey} user={user} />}
{showNip05 && nip05 && <Nip05 nip05={nip05} pubkey={pubkey} verifyNip={verifyNip} />}
</div>
<div className="subheader">{subHeader}</div>
</div>