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://relay.snort.social/": { "read": true, "write": true },
"wss://nostr.wine/": { "read": true, "write": false }, "wss://nostr.wine/": { "read": true, "write": false },
"wss://eden.nostr.land/": { "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://eden.nostr.land/": { "read": true, "write": false },
"wss://relay.nostr.band/": { "read": true, "write": true }, "wss://relay.nostr.band/": { "read": true, "write": true },
"wss://relay.damus.io/": { "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; eventLinkPrefix: NostrPrefix;
profileLinkPrefix: NostrPrefix; profileLinkPrefix: NostrPrefix;
defaultRelays: Record<string, RelaySettings>; defaultRelays: Record<string, RelaySettings>;
showNip05InNotes: boolean;
}; };
/** /**

View File

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

View File

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

View File

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

View File

@ -49,7 +49,7 @@ export function ProfileCard({
align="end"> align="end">
<div className="flex flex-col g8"> <div className="flex flex-col g8">
<div className="flex justify-between"> <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"> <div className="flex g8">
{/*<button type="button" onClick={() => { {/*<button type="button" onClick={() => {
LoginStore.loginWithPubkey(pubkey, LoginSessionType.PublicKey, undefined, undefined, undefined, true); 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 classNames from "classnames";
import Avatar from "@/Element/User/Avatar"; import Avatar from "@/Element/User/Avatar";
import Nip05 from "@/Element/User/Nip05";
import DisplayName from "./DisplayName"; import DisplayName from "./DisplayName";
import { ProfileLink } from "./ProfileLink"; import { ProfileLink } from "./ProfileLink";
import { ProfileCard } from "./ProfileCard"; import { ProfileCard } from "./ProfileCard";
@ -20,7 +19,6 @@ export interface ProfileImageProps {
link?: string; link?: string;
defaultNip?: string; defaultNip?: string;
verifyNip?: boolean; verifyNip?: boolean;
showNip05?: boolean;
overrideUsername?: string; overrideUsername?: string;
profile?: UserMetadata; profile?: UserMetadata;
size?: number; size?: number;
@ -37,9 +35,6 @@ export default function ProfileImage({
showUsername = true, showUsername = true,
className, className,
link, link,
defaultNip,
verifyNip,
showNip05 = true,
overrideUsername, overrideUsername,
profile, profile,
size, size,
@ -50,7 +45,6 @@ export default function ProfileImage({
showProfileCard = true, showProfileCard = true,
}: ProfileImageProps) { }: ProfileImageProps) {
const user = useUserProfile(profile ? "" : pubkey) ?? profile; const user = useUserProfile(profile ? "" : pubkey) ?? profile;
const nip05 = defaultNip ? defaultNip : user?.nip05;
const [isHovering, setIsHovering] = useState(false); const [isHovering, setIsHovering] = useState(false);
const hoverTimeoutRef = useRef<NodeJS.Timeout | null>(null); const hoverTimeoutRef = useRef<NodeJS.Timeout | null>(null);
@ -96,7 +90,6 @@ export default function ProfileImage({
<div className="f-ellipsis"> <div className="f-ellipsis">
<div className="flex g4 username"> <div className="flex g4 username">
{overrideUsername ? overrideUsername : <DisplayName pubkey={pubkey} user={user} />} {overrideUsername ? overrideUsername : <DisplayName pubkey={pubkey} user={user} />}
{showNip05 && nip05 && <Nip05 nip05={nip05} pubkey={pubkey} verifyNip={verifyNip} />}
</div> </div>
<div className="subheader">{subHeader}</div> <div className="subheader">{subHeader}</div>
</div> </div>