feat: select-none

This commit is contained in:
codytseng
2025-04-12 00:00:45 +08:00
parent a10c9d8ffe
commit ea5b50cf0a
7 changed files with 26 additions and 14 deletions

View File

@@ -70,7 +70,13 @@ const NotePage = forwardRef(({ id, index }: { id?: string; index?: number }, ref
<ParentNote key={`root-note-${event.id}`} eventId={rootEventId} />
)}
<ParentNote key={`parent-note-${event.id}`} eventId={parentEventId} />
<Note key={`note-${event.id}`} event={event} fetchNoteStats hideParentNotePreview />
<Note
key={`note-${event.id}`}
event={event}
className="select-text"
fetchNoteStats
hideParentNotePreview
/>
</div>
<Separator className="mt-4" />
{event.kind === kinds.ShortTextNote ? (

View File

@@ -98,7 +98,7 @@ const ProfilePage = forwardRef(({ id, index }: { id?: string; index?: number },
</div>
<div className="pt-2">
<div className="flex gap-2 items-center">
<div className="text-xl font-semibold truncate">{username}</div>
<div className="text-xl font-semibold truncate select-text">{username}</div>
{isFollowingYou && (
<div className="text-muted-foreground rounded-full bg-muted text-xs h-fit px-2 shrink-0">
{t('Follows you')}
@@ -107,7 +107,7 @@ const ProfilePage = forwardRef(({ id, index }: { id?: string; index?: number },
</div>
<Nip05 pubkey={pubkey} />
{lightningAddress && (
<div className="text-sm text-yellow-400 flex gap-1 items-center">
<div className="text-sm text-yellow-400 flex gap-1 items-center select-text">
<Zap className="size-4 shrink-0" />
<div className="flex-1 max-w-fit w-0 truncate">{lightningAddress}</div>
</div>
@@ -116,9 +116,12 @@ const ProfilePage = forwardRef(({ id, index }: { id?: string; index?: number },
<PubkeyCopy pubkey={pubkey} />
<QrCodePopover pubkey={pubkey} />
</div>
<ProfileAbout about={about} className="text-wrap break-words whitespace-pre-wrap mt-2" />
<ProfileAbout
about={about}
className="text-wrap break-words whitespace-pre-wrap mt-2 select-text"
/>
{website && (
<div className="flex gap-1 items-center text-primary mt-2 truncate">
<div className="flex gap-1 items-center text-primary mt-2 truncate select-text">
<Link size={14} className="shrink-0" />
<a
href={website}