style: 🎨

This commit is contained in:
codytseng
2025-06-26 23:50:04 +08:00
parent 6cc3dd32a5
commit 544d65972a
3 changed files with 18 additions and 11 deletions

View File

@@ -24,20 +24,27 @@ export default function Nip05({ pubkey, append }: { pubkey: string; append?: str
if (!profile?.nip05 || !nip05Name || !nip05Domain) return null
return (
<div className="flex items-center gap-1 truncate" onClick={(e) => e.stopPropagation()}>
<div
className="flex items-center gap-1 truncate [&_svg]:size-3.5 [&_svg]:shrink-0"
onClick={(e) => e.stopPropagation()}
>
{nip05Name !== '_' ? (
<span className="text-sm text-muted-foreground truncate">@{nip05Name}</span>
) : null}
{nip05IsVerified ? (
<Favicon
domain={nip05Domain}
className="w-3.5 h-3.5"
fallback={<BadgeCheck className="text-primary" />}
/>
) : (
<BadgeAlert className="text-muted-foreground" />
)}
<SecondaryPageLink
to={toNoteList({ domain: nip05Domain })}
className={`flex items-center gap-1 hover:underline truncate [&_svg]:size-3.5 [&_svg]:shrink-0 ${nip05IsVerified ? 'text-primary' : 'text-muted-foreground'}`}
className={`hover:underline truncate ${nip05IsVerified ? 'text-primary' : 'text-muted-foreground'}`}
>
{nip05IsVerified ? (
<Favicon domain={nip05Domain} className="w-3.5 h-3.5" fallback={<BadgeCheck />} />
) : (
<BadgeAlert />
)}
<span className="text-sm truncate">{nip05Domain}</span>
{nip05Domain}
</SecondaryPageLink>
{append && <span className="text-sm text-muted-foreground truncate">{append}</span>}
</div>

View File

@@ -62,7 +62,7 @@ export default function Note({
<span className="text-sm text-muted-foreground shrink-0">using {usingClient}</span>
)}
</div>
<div className="flex items-baseline gap-1 text-sm text-muted-foreground">
<div className="flex items-center gap-1 text-sm text-muted-foreground">
<Nip05 pubkey={event.pubkey} append="·" />
<FormattedTimestamp
timestamp={event.created_at}

View File

@@ -52,7 +52,7 @@ export default function ReplyNote({
<div className="w-full overflow-hidden">
<div className="flex items-start justify-between gap-2">
<div className="flex-1 w-0">
<div className="flex gap-1 items-baseline">
<div className="flex gap-1 items-center">
<Username
userId={event.pubkey}
className="text-sm font-semibold text-muted-foreground hover:text-foreground truncate"
@@ -64,7 +64,7 @@ export default function ReplyNote({
</span>
)}
</div>
<div className="flex items-baseline gap-1 text-sm text-muted-foreground">
<div className="flex items-center gap-1 text-sm text-muted-foreground">
<Nip05 pubkey={event.pubkey} append="·" />
<FormattedTimestamp
timestamp={event.created_at}