Fix UI — CSS variables, sidebar toggle with chevron, settings panel pushes content

This commit is contained in:
2026-04-26 06:37:13 +00:00
parent 996c4e19a7
commit e9531a0321
6 changed files with 56 additions and 51 deletions
+1 -9
View File
@@ -60,20 +60,12 @@ export default function SettingsPanel() {
return (
<>
{/* Backdrop on mobile */}
{settingsOpen && (
<div
className="fixed inset-0 z-40 bg-black/40 md:hidden"
onClick={() => setSettingsOpen(false)}
/>
)}
<div
className={`fixed top-0 right-0 bottom-0 z-50 flex flex-col transition-transform duration-200 ${
settingsOpen ? 'translate-x-0' : 'translate-x-full'
}`}
style={{
width: 'min(340px, 100vw)',
width: '340px',
background: 'var(--bg)',
borderLeft: '1px solid var(--border)',
}}
+2 -2
View File
@@ -27,7 +27,7 @@ function groupConversations(convs: { id: string; title: string; updated_at: stri
return groups;
}
export default function Sidebar() {
export default function Sidebar({ onClose }: { onClose?: () => void }) {
const { conversations, currentId, setCurrentId, setMessages, setConversations, setSidebarOpen } = useStore();
async function newConversation() {
@@ -36,7 +36,7 @@ export default function Sidebar() {
setConversations(updated);
setCurrentId(conv.id);
setMessages([]);
setSidebarOpen(false);
if (onClose) onClose();
}
async function loadConversation(id: string) {