Files
vega/src/components/shared/HelpModal.tsx
Jure 3a196cb9a0 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>
2026-03-11 20:39:30 +01:00

43 lines
1.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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>
);
}