feat: add protected badge for NIP-70 events

Display a subtle green "Protected" badge next to the username for
events with the `-` tag (NIP-70), indicating restricted distribution.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
codytseng 2026-03-19 22:27:11 +08:00
parent 67f308e47f
commit bd6340bbc7
20 changed files with 78 additions and 18 deletions

View file

@ -11,6 +11,7 @@ import AudioPlayer from '../AudioPlayer'
import ClientTag from '../ClientTag'
import Content from '../Content'
import FollowingBadge from '../FollowingBadge'
import ProtectedBadge from '../ProtectedBadge'
import { FormattedTimestamp } from '../FormattedTimestamp'
import Nip05 from '../Nip05'
import NoteOptions from '../NoteOptions'
@ -134,6 +135,7 @@ export default function Note({
/>
<FollowingBadge pubkey={event.pubkey} />
<TrustScoreBadge pubkey={event.pubkey} />
<ProtectedBadge event={event} />
<ClientTag event={event} />
</div>
<div className="flex items-center gap-1 text-sm text-muted-foreground">