diff --git a/dist/index.html b/dist/index.html
index e6c0cae3..9780a955 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -6,8 +6,8 @@
{/* Due date */}
-
+
+
setDueDate(e.target.value)}
- className="absolute inset-0 opacity-0 cursor-pointer"
- />
-
+ />
+ {dueDate && (
+
+ )}
{/* Priority selector */}
diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx
index 2bf87a40..a23fa950 100644
--- a/src/components/Layout.tsx
+++ b/src/components/Layout.tsx
@@ -1,12 +1,13 @@
import { useEffect } from 'react';
import { Outlet, Navigate } from 'react-router-dom';
import { Sidebar } from './Sidebar';
+import { TaskDetail } from './TaskDetail';
import { useAuthStore } from '@/stores/auth';
import { useTasksStore } from '@/stores/tasks';
export function Layout() {
const { isAuthenticated, isLoading } = useAuthStore();
- const { fetchProjects, fetchLabels } = useTasksStore();
+ const { fetchProjects, fetchLabels, selectedTask, setSelectedTask } = useTasksStore();
useEffect(() => {
if (isAuthenticated) {
@@ -36,6 +37,12 @@ export function Layout() {
+ {selectedTask && (
+
setSelectedTask(null)}
+ />
+ )}
);
}
diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx
index 7629a539..b8a12a04 100644
--- a/src/components/Sidebar.tsx
+++ b/src/components/Sidebar.tsx
@@ -2,7 +2,8 @@ import { useState, useRef, useEffect } from 'react';
import { Link, useLocation, useNavigate } from 'react-router-dom';
import {
Inbox, Calendar, CalendarDays, Plus, ChevronDown, ChevronRight,
- Hash, Settings, LogOut, User, FolderPlus, Tag, X, Check
+ Hash, Settings, LogOut, User, FolderPlus, Tag, X, Check,
+ PanelLeftClose, PanelLeftOpen
} from 'lucide-react';
import { cn } from '@/lib/utils';
import { useAuthStore } from '@/stores/auth';
@@ -13,6 +14,8 @@ const PROJECT_COLORS = [
'#ec4899', '#06b6d4', '#f97316', '#6366f1', '#14b8a6',
];
+const SIDEBAR_COLLAPSED_KEY = 'sidebar-collapsed';
+
export function Sidebar() {
const location = useLocation();
const navigate = useNavigate();
@@ -24,6 +27,13 @@ export function Sidebar() {
const [newProjectName, setNewProjectName] = useState('');
const [newProjectColor, setNewProjectColor] = useState(PROJECT_COLORS[0]);
const [isCreatingProject, setIsCreatingProject] = useState(false);
+ const [isCollapsed, setIsCollapsed] = useState(() => {
+ try {
+ return localStorage.getItem(SIDEBAR_COLLAPSED_KEY) === 'true';
+ } catch {
+ return false;
+ }
+ });
const newProjectInputRef = useRef
(null);
useEffect(() => {
@@ -32,6 +42,14 @@ export function Sidebar() {
}
}, [showNewProject]);
+ const toggleCollapsed = () => {
+ const next = !isCollapsed;
+ setIsCollapsed(next);
+ try {
+ localStorage.setItem(SIDEBAR_COLLAPSED_KEY, String(next));
+ } catch {}
+ };
+
const handleCreateProject = async () => {
if (!newProjectName.trim() || isCreatingProject) return;
setIsCreatingProject(true);
@@ -67,6 +85,92 @@ export function Sidebar() {
{ path: '/today', icon: Calendar, label: 'Today', color: '#22c55e' },
{ path: '/upcoming', icon: CalendarDays, label: 'Upcoming', color: '#8b5cf6' },
];
+
+ // Collapsed sidebar
+ if (isCollapsed) {
+ return (
+
+ );
+ }
return (
+