Simplify chat UI to focus on main input with pastel gradient background
- Hide sidebar (conversations, model picker, MCP servers) while preserving components - Hide navbar/title bar while preserving component - Remove title text and description above input field - Add pastel gradient background (pink-purple-indigo) - Expand conversation thread to full width - Create minimal, focused interface with only white input field visible
This commit is contained in:
parent
55c1756f36
commit
15bb63670a
2 changed files with 43 additions and 33 deletions
|
|
@ -102,27 +102,32 @@ const ChatApp: React.FC<ChatAppProps> = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex h-dvh w-screen overflow-clip bg-white">
|
<div className="flex h-dvh w-screen overflow-clip bg-gradient-to-br from-pink-100 via-purple-50 to-indigo-100">
|
||||||
<div className="flex flex-row flex-grow flex-1 overflow-hidden relative">
|
<div className="flex flex-row flex-grow flex-1 overflow-hidden relative">
|
||||||
<ChatSidebar
|
{/* Sidebar and Navbar components hidden but kept in codebase */}
|
||||||
sidebarVisible={sidebarVisible}
|
{false && (
|
||||||
setSidebarVisible={setSidebarVisible}
|
<>
|
||||||
conversations={conversations}
|
<ChatSidebar
|
||||||
conversationId={conversationId}
|
sidebarVisible={sidebarVisible}
|
||||||
setConversationId={setConversationId}
|
setSidebarVisible={setSidebarVisible}
|
||||||
deleteConversation={deleteConversation}
|
conversations={conversations}
|
||||||
editConversationTitle={editConversationTitle}
|
conversationId={conversationId}
|
||||||
startNewConversation={startNewConversation}
|
setConversationId={setConversationId}
|
||||||
selectedModel={selectedModel}
|
deleteConversation={deleteConversation}
|
||||||
onModelChange={handleModelChange}
|
editConversationTitle={editConversationTitle}
|
||||||
apiKeyUpdateTrigger={apiKeyUpdateTrigger}
|
startNewConversation={startNewConversation}
|
||||||
onMcpToolsUpdate={setMcpTools}
|
selectedModel={selectedModel}
|
||||||
/>
|
onModelChange={handleModelChange}
|
||||||
<div className="flex flex-col flex-grow h-full w-[calc(100%-16rem)] lg:w-[calc(100%-32rem)]">
|
apiKeyUpdateTrigger={apiKeyUpdateTrigger}
|
||||||
<ChatNavbar
|
onMcpToolsUpdate={setMcpTools}
|
||||||
sidebarVisible={sidebarVisible}
|
/>
|
||||||
setSidebarVisible={setSidebarVisible}
|
<ChatNavbar
|
||||||
/>
|
sidebarVisible={sidebarVisible}
|
||||||
|
setSidebarVisible={setSidebarVisible}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
<div className="flex flex-col flex-grow h-full w-full">
|
||||||
<ConversationThread
|
<ConversationThread
|
||||||
conversations={conversations}
|
conversations={conversations}
|
||||||
conversationId={conversationId}
|
conversationId={conversationId}
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,7 @@ const ConversationThread: React.FC<ConversationThreadProps> = ({
|
||||||
console.log({ currentConversation })
|
console.log({ currentConversation })
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`flex flex-col h-[calc(100%-3rem)] w-full ${currentConversation.messages.length === 0 ? 'justify-center' : ''}`}>
|
<div className={`flex flex-col h-full w-full ${currentConversation.messages.length === 0 ? 'justify-center' : ''}`}>
|
||||||
<div
|
<div
|
||||||
ref={messagesContainerRef}
|
ref={messagesContainerRef}
|
||||||
className={`
|
className={`
|
||||||
|
|
@ -170,19 +170,24 @@ const ConversationThread: React.FC<ConversationThreadProps> = ({
|
||||||
<div className="max-w-2xl mx-auto w-full px-4">
|
<div className="max-w-2xl mx-auto w-full px-4">
|
||||||
{currentConversation.messages.length === 0 ? (
|
{currentConversation.messages.length === 0 ? (
|
||||||
<div className="text-center">
|
<div className="text-center">
|
||||||
<h1 className="text-4xl font-semibold text-zinc-800">What do you want to know?</h1>
|
{/* Title and description text hidden but kept in codebase */}
|
||||||
<div className="mt-4">
|
{false && (
|
||||||
<h2 className="mt-2 text-md opacity-70">
|
<>
|
||||||
AI chat template built with React, Vite and Cloudflare Workers AI.
|
<h1 className="text-4xl font-semibold text-zinc-800">What do you want to know?</h1>
|
||||||
<div className="mt-1 w-full">
|
<div className="mt-4">
|
||||||
Find the source code on{' '}
|
<h2 className="mt-2 text-md opacity-70">
|
||||||
<a className="text-blue-700" href="https://github.com/thomasgauvin/ai-chat-template">
|
AI chat template built with React, Vite and Cloudflare Workers AI.
|
||||||
GitHub
|
<div className="mt-1 w-full">
|
||||||
</a>
|
Find the source code on{' '}
|
||||||
.
|
<a className="text-blue-700" href="https://github.com/thomasgauvin/ai-chat-template">
|
||||||
|
GitHub
|
||||||
|
</a>
|
||||||
|
.
|
||||||
|
</div>
|
||||||
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
</h2>
|
</>
|
||||||
</div>
|
)}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="py-4 px-4 space-y-4">
|
<div className="py-4 px-4 space-y-4">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue