From 21cbd65706c5880e69f4608a1eee687b2b794c99 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Jan 2026 15:42:57 +0000 Subject: [PATCH] feat: make sign-in message clickable to open login dialog Add clickable 'Sign in' link to the logged-out message composer: - Import LoginDialog component - Add showLogin state management - Make 'Sign in' text an underlined button that opens the login dialog - Add LoginDialog component with controlled state This provides a better UX by allowing users to quickly sign in directly from the chat interface. --- src/components/ChatViewer.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/components/ChatViewer.tsx b/src/components/ChatViewer.tsx index 282b151..b62d872 100644 --- a/src/components/ChatViewer.tsx +++ b/src/components/ChatViewer.tsx @@ -43,6 +43,7 @@ import { StatusBadge } from "./live/StatusBadge"; import { ChatMessageContextMenu } from "./chat/ChatMessageContextMenu"; import { useGrimoire } from "@/core/state"; import { Button } from "./ui/button"; +import LoginDialog from "./nostr/LoginDialog"; import { MentionEditor, type MentionEditorHandle, @@ -591,6 +592,9 @@ export function ChatViewer({ // State for tooltip open (for mobile tap support) const [tooltipOpen, setTooltipOpen] = useState(false); + // State for login dialog + const [showLogin, setShowLogin] = useState(false); + // Handle sending messages with error handling const handleSend = async ( content: string, @@ -1104,9 +1108,18 @@ export function ChatViewer({ ) : (
- Sign in to send messages + {" "} + to send messages
)} + + {/* Login dialog */} + ); }