From a6cd0ea41d97f134d3af9ea806fdc388b265e1ac Mon Sep 17 00:00:00 2001 From: Joakim Date: Sat, 14 Feb 2026 17:30:02 +0100 Subject: [PATCH] feat(web): update TaskItem and TaskList for single-screen design TaskItem: remove onClick navigation, wrap in SwipeAction for swipe-to-complete, update priority colors (H=red, M=amber, L=gray, default=hidden), add due-today amber color. TaskList: accept activeReport prop for context-aware empty states, replace onToggle/onTaskClick with onComplete, make scrollable with flex:1 and overflow-y:auto. Co-Authored-By: Claude Opus 4.6 --- opal-web/src/lib/components/TaskItem.svelte | 152 ++++++++++---------- opal-web/src/lib/components/TaskList.svelte | 52 ++++--- 2 files changed, 109 insertions(+), 95 deletions(-) diff --git a/opal-web/src/lib/components/TaskItem.svelte b/opal-web/src/lib/components/TaskItem.svelte index 5a0fa9f..bdd5d14 100644 --- a/opal-web/src/lib/components/TaskItem.svelte +++ b/opal-web/src/lib/components/TaskItem.svelte @@ -1,65 +1,66 @@ -
onClick(task.uuid)} role="button" tabindex="0"> -
onToggle(task.uuid)}> - -
- -
-
- - {task.description} - + onComplete(task.uuid)}> +
+
onComplete(task.uuid)} role="button" tabindex="-1"> +
- -
- {#if task.project} - {task.project} - {/if} - - {#if task.priority > 1} - - {priorityLabel} + +
+
+ + {task.description} - {/if} - - {#if task.due} - - {formatRelative(task.due)} - - {/if} - - {#if task.tags && task.tags.length > 0} -
- {#each task.tags as tag} - {tag} - {/each} -
- {/if} +
+ +
+ {#if task.project} + {task.project} + {/if} + + {#if task.priority === 3} + High + {:else if task.priority === 2} + Med + {:else if task.priority === 0} + Low + {/if} + + {#if task.due} + + {formatRelative(task.due)} + + {/if} + + {#if task.tags && task.tags.length > 0} +
+ {#each task.tags as tag} + {tag} + {/each} +
+ {/if} +
-
+