diff --git a/src/lib/pages/TasksPage.svelte b/src/lib/pages/TasksPage.svelte index 211adca..3fd4abb 100644 --- a/src/lib/pages/TasksPage.svelte +++ b/src/lib/pages/TasksPage.svelte @@ -4,6 +4,9 @@ tasks, addTask, completeTask, uncompleteTask, deleteTask, updateTask, taskLists, addTaskList, renameTaskList, deleteTaskList, } from "$lib/stores/page.svelte.js"; + import WipTaskList from '$lib/components/WipTaskList.svelte'; + import EmptyState from '$lib/components/EmptyState.svelte'; + import { SquareCheck, Search, ExternalLink, ChevronLeft, ArrowUpDown, Plus, X, ChevronRight } from 'lucide-svelte'; import Card from "$lib/components/Card.svelte"; import { formatTimestamp } from "$lib/utils/time.js"; import { BUCKET_COLORS, EFFORT_LABELS, EFFORT_ORDER } from "$lib/utils/constants.js"; @@ -23,21 +26,18 @@ let editingName = $state(""); const buckets = [ - { id: "all", label: "All", icon: "M4 6h16M4 12h16M4 18h16" }, - { id: "inbox", label: "Inbox", icon: "M20 12V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v6m16 0v6a2 2 0 0 0-2 2H6a2 2 0 0 0-2-2v-6m16 0H4" }, - { id: "today", label: "Today", icon: "M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16Zm-1-13v5l4.28 2.54.72-1.21-3.5-2.08V7h-1.5Z" }, - { id: "soon", label: "Soon", icon: "M17 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2ZM7 7h10M7 11h10M7 15h5" }, - { id: "later", label: "Later", icon: "M5 3v18l7-3 7 3V3H5Z" }, + { id: "all", label: "All" }, + { id: "inbox", label: "Inbox" }, + { id: "today", label: "Today" }, + { id: "soon", label: "Soon" }, + { id: "later", label: "Later" }, ]; - let filteredTasks = $derived.by(() => { let list = tasks.filter((t) => !t.done); - // Bucket filter if (activeBucket !== "all") { list = list.filter((t) => t.bucket === activeBucket); } - // List filter if (activeListId !== "all") { if (activeListId === "inbox") { list = list.filter((t) => !t.listId); @@ -45,12 +45,10 @@ list = list.filter((t) => t.listId === activeListId); } } - // Search if (searchQuery.trim()) { const q = searchQuery.toLowerCase(); list = list.filter((t) => t.text.toLowerCase().includes(q)); } - // Sort if (sortMode === "quick-first") { list.sort((a, b) => (EFFORT_ORDER[a.effort] || 4) - (EFFORT_ORDER[b.effort] || 4)); } else if (sortMode === "deep-first") { @@ -118,7 +116,6 @@ updateTask(taskId, { effort: effort === tasks.find((t) => t.id === taskId)?.effort ? "" : effort }); } - function getListName(listId) { if (!listId) return null; return taskLists.find((l) => l.id === listId)?.name || null; @@ -132,7 +129,6 @@ } } - // List management function handleCreateList(e) { if (e.key === "Enter" && newListName.trim()) { addTaskList(newListName.trim()); @@ -174,28 +170,25 @@
Extracted from transcripts or added manually
+Add tasks manually. Automatic extraction from your transcripts is coming.
- {searchQuery ? "No matching tasks" - : activeListId !== "all" && activeBucket !== "all" - ? `No ${activeBucket} tasks in ${activeListName}` - : activeListId !== "all" - ? `No tasks in ${activeListName}` - : activeBucket === "all" ? "No tasks yet" : `Nothing in ${activeBucket}`} -
-- {searchQuery ? "Try a different search" : "Tasks are extracted from transcripts or added above"} -
-{task.text}
@@ -499,12 +481,11 @@