fix: theme
This commit is contained in:
@@ -64,13 +64,13 @@ function DesktopSidebar({
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`
|
className={`
|
||||||
flex transition-[transform,opacity] duration-300 ease-in-out overflow-hidden
|
flex transition-all duration-300 ease overflow-hidden
|
||||||
${isOpen ? 'w-64 opacity-100' : 'w-0 opacity-0'}
|
${isOpen ? 'w-64 opacity-100' : 'w-0 opacity-0'}
|
||||||
`}
|
`}
|
||||||
>
|
>
|
||||||
{activePanel && (
|
{activePanel && (
|
||||||
<div className="w-64 flex flex-col border-r border-muted transition-theme">
|
<div className="w-64 flex flex-col border-r border-muted transition-theme">
|
||||||
<div className="flex items-center justify-between px-4 py-3 border-b border-muted shrink-0">
|
<div className="flex items-center justify-between px-4 py-3 border-b border-muted shrink-0 transition-theme">
|
||||||
<span className="text-sm font-semibold text-accent">
|
<span className="text-sm font-semibold text-accent">
|
||||||
{activePanel.label}
|
{activePanel.label}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ export default function ChatUI({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-1 bg-primary text-primary transition-theme">
|
<div className="flex flex-1 bg-primary text-primary transition-theme relative">
|
||||||
{notification && (
|
{notification && (
|
||||||
<div className="fixed bottom-4 right-4 bg-red-500 text-white px-4 py-2 rounded-lg shadow-lg z-50">
|
<div className="fixed bottom-4 right-4 bg-red-500 text-white px-4 py-2 rounded-lg shadow-lg z-50">
|
||||||
{notification}
|
{notification}
|
||||||
@@ -152,9 +152,26 @@ export default function ChatUI({
|
|||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
{/* Input */}
|
{/* Input — floats center when empty, slides to bottom on first message */}
|
||||||
<div className="p-4 border-t border-white/10">
|
<div
|
||||||
<div className="w-full max-w-2xl mx-auto">
|
className={`
|
||||||
|
transition-all duration-500 ease-in-out
|
||||||
|
${messages.length === 0
|
||||||
|
? 'absolute inset-0 flex items-center justify-center pointer-events-none'
|
||||||
|
: 'p-4'}
|
||||||
|
`}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className={`
|
||||||
|
w-full max-w-2xl mx-auto pointer-events-auto
|
||||||
|
transition-all duration-500 ease-in-out
|
||||||
|
`}
|
||||||
|
>
|
||||||
|
{messages.length === 0 && (
|
||||||
|
<p className="text-center text-primary text-sm mb-3 opacity-60">
|
||||||
|
Start a conversation…
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
<input
|
<input
|
||||||
value={input}
|
value={input}
|
||||||
onChange={(e) => setInput(e.target.value)}
|
onChange={(e) => setInput(e.target.value)}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ function ConversationHistoryPanel() {
|
|||||||
className="flex flex-col px-3 py-2 rounded-lg hover:bg-white/10 cursor-pointer transition-colors"
|
className="flex flex-col px-3 py-2 rounded-lg hover:bg-white/10 cursor-pointer transition-colors"
|
||||||
>
|
>
|
||||||
<span className="text-sm font-medium truncate">{h.title}</span>
|
<span className="text-sm font-medium truncate">{h.title}</span>
|
||||||
<span className="text-xs text-white/40">{h.time}</span>
|
<span className="text-xs text-secondary">{h.time}</span>
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
+8
-2
@@ -27,6 +27,7 @@ body {
|
|||||||
--bg-secondary: oklch(27.4% 0.006 286.033);
|
--bg-secondary: oklch(27.4% 0.006 286.033);
|
||||||
|
|
||||||
--text-primary: #ffffff;
|
--text-primary: #ffffff;
|
||||||
|
--text-secondary: #bbbbbb;
|
||||||
|
|
||||||
--accent: #00d4ff;
|
--accent: #00d4ff;
|
||||||
--accent2: #7b2ff7;
|
--accent2: #7b2ff7;
|
||||||
@@ -47,13 +48,14 @@ body {
|
|||||||
|
|
||||||
.light-mode {
|
.light-mode {
|
||||||
--bg-primary: #e0e0e0;
|
--bg-primary: #e0e0e0;
|
||||||
--bg-secondary: oklch(96.7% 0.001 286.375);
|
--bg-secondary: #dadada;
|
||||||
|
|
||||||
--text-primary: #111111;
|
--text-primary: #111111;
|
||||||
|
--text-secondary: #666666;
|
||||||
|
|
||||||
--accent: #0077ff;
|
--accent: #0077ff;
|
||||||
|
|
||||||
--muted-color: #ffffff33;
|
--muted-color: #88888833;
|
||||||
|
|
||||||
--color-base: #ffffff;
|
--color-base: #ffffff;
|
||||||
--color-inverse: #000000;
|
--color-inverse: #000000;
|
||||||
@@ -83,6 +85,10 @@ body {
|
|||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text-secondary {
|
||||||
|
color: var(--text-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
.text-accent {
|
.text-accent {
|
||||||
color: var(--accent);
|
color: var(--accent);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user