Add DM inbox with NIP-04/NIP-17 support and soft delete
Features: - Full DM inbox UI with conversation list and message view - Support for both NIP-04 (kind 4) and NIP-17 (kind 14/1059) encryption - Progressive message decryption with background loading - Soft delete using kind 30078 Application Specific Data events - Message selection UI with delete selected/delete all - Undelete all functionality per conversation - Jump to newest button with new message counter - Conversation filtering (all / follows only) - Per-conversation relay and encryption settings - New messages indicator on sidebar (clears when inbox viewed) - Follow indicator on conversation items 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
25
src/components/Sidebar/InboxButton.tsx
Normal file
25
src/components/Sidebar/InboxButton.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import { usePrimaryPage } from '@/PageManager'
|
||||
import { useDM } from '@/providers/DMProvider'
|
||||
import { MessageSquare } from 'lucide-react'
|
||||
import SidebarItem from './SidebarItem'
|
||||
|
||||
export default function InboxButton({ collapse }: { collapse: boolean }) {
|
||||
const { navigate, current, display } = usePrimaryPage()
|
||||
const { hasNewMessages } = useDM()
|
||||
|
||||
return (
|
||||
<SidebarItem
|
||||
title="Inbox"
|
||||
onClick={() => navigate('inbox')}
|
||||
active={display && current === 'inbox'}
|
||||
collapse={collapse}
|
||||
>
|
||||
<div className="relative">
|
||||
<MessageSquare />
|
||||
{hasNewMessages && (
|
||||
<div className="absolute -top-1 right-0 w-2 h-2 ring-2 ring-background bg-primary rounded-full" />
|
||||
)}
|
||||
</div>
|
||||
</SidebarItem>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user