mirror of
https://github.com/hoornet/vega.git
synced 2026-04-24 14:50:00 -07:00
Bump to v0.2.0 — Phase 2: Engagement & Reach
Four features shipped in this release: - Feed reply context: replies show "↩ replying to @name" above the note content; clicking fetches and opens the parent thread - NIP-65 outbox model: fetchUserRelayList + publishRelayList + fetchUserNotesNIP65 in client.ts; profile notes fetched via the author's write relays; "Publish relay list to Nostr" button in Settings (kind 10002) - Notifications: new store (notifications.ts) + NotificationsView; 🔔 sidebar nav item with unread badge; DM nav item also shows unread conversation count; badges clear on open/select - Keyboard shortcuts: useKeyboardShortcuts hook + HelpModal; n=compose, /=search, j/k=feed nav with ring highlight, Esc=back, ?=help overlay Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
42
src/components/shared/HelpModal.tsx
Normal file
42
src/components/shared/HelpModal.tsx
Normal file
@@ -0,0 +1,42 @@
|
||||
const SHORTCUTS = [
|
||||
{ key: "n", desc: "New note / focus compose" },
|
||||
{ key: "/", desc: "Search" },
|
||||
{ key: "j", desc: "Next note in feed" },
|
||||
{ key: "k", desc: "Previous note in feed" },
|
||||
{ key: "Esc", desc: "Go back" },
|
||||
{ key: "?", desc: "This help" },
|
||||
];
|
||||
|
||||
export function HelpModal({ onClose }: { onClose: () => void }) {
|
||||
return (
|
||||
<div
|
||||
className="fixed inset-0 z-50 flex items-center justify-center bg-black/50"
|
||||
onClick={onClose}
|
||||
>
|
||||
<div
|
||||
className="bg-bg border border-border shadow-xl p-6 w-72"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<div className="flex items-center justify-between mb-4">
|
||||
<h2 className="text-text text-sm font-medium tracking-wide">Keyboard Shortcuts</h2>
|
||||
<button
|
||||
onClick={onClose}
|
||||
className="text-text-dim hover:text-text transition-colors text-[14px]"
|
||||
>
|
||||
×
|
||||
</button>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
{SHORTCUTS.map(({ key, desc }) => (
|
||||
<div key={key} className="flex items-center gap-3">
|
||||
<kbd className="bg-bg-raised border border-border text-text text-[11px] font-mono px-2 py-0.5 min-w-[2.5rem] text-center shrink-0">
|
||||
{key}
|
||||
</kbd>
|
||||
<span className="text-text-dim text-[12px]">{desc}</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user