diff --git a/opal-web/src/lib/components/TaskItem.svelte b/opal-web/src/lib/components/TaskItem.svelte new file mode 100644 index 0000000..5a0fa9f --- /dev/null +++ b/opal-web/src/lib/components/TaskItem.svelte @@ -0,0 +1,163 @@ + + +
onClick(task.uuid)} role="button" tabindex="0"> +
onToggle(task.uuid)}> + +
+ +
+
+ + {task.description} + +
+ +
+ {#if task.project} + {task.project} + {/if} + + {#if task.priority > 1} + + {priorityLabel} + + {/if} + + {#if task.due} + + {formatRelative(task.due)} + + {/if} + + {#if task.tags && task.tags.length > 0} +
+ {#each task.tags as tag} + {tag} + {/each} +
+ {/if} +
+
+
+ + diff --git a/opal-web/src/lib/components/TaskList.svelte b/opal-web/src/lib/components/TaskList.svelte new file mode 100644 index 0000000..3f3f967 --- /dev/null +++ b/opal-web/src/lib/components/TaskList.svelte @@ -0,0 +1,84 @@ + + +
+ {#if loading} +
+
+

Loading tasks...

+
+ {:else if tasks.length === 0} +
+ + + +

{emptyMessage}

+
+ {:else} + {#each tasks as task (task.uuid)} + + {/each} + {/if} +
+ + diff --git a/opal-web/src/routes/+page.svelte b/opal-web/src/routes/+page.svelte index cc88df0..c08de5a 100644 --- a/opal-web/src/routes/+page.svelte +++ b/opal-web/src/routes/+page.svelte @@ -1,2 +1,176 @@ -

Welcome to SvelteKit

-

Visit svelte.dev/docs/kit to read the documentation

+ + +
+
+
+

Tasks

+ + + + + New + +
+ +
+ + +
+ + +
+
+ + diff --git a/opal-web/src/routes/tasks/[uuid]/+page.svelte b/opal-web/src/routes/tasks/[uuid]/+page.svelte new file mode 100644 index 0000000..a920d70 --- /dev/null +++ b/opal-web/src/routes/tasks/[uuid]/+page.svelte @@ -0,0 +1,26 @@ + + +
+
+

Task Detail

+

UUID: {uuid}

+

Task detail view coming in next iteration...

+ ← Back to tasks +
+
+ + diff --git a/opal-web/src/routes/tasks/new/+page.svelte b/opal-web/src/routes/tasks/new/+page.svelte new file mode 100644 index 0000000..a8c37a6 --- /dev/null +++ b/opal-web/src/routes/tasks/new/+page.svelte @@ -0,0 +1,172 @@ + + +
+
+
+ + + + + Back + +

New Task

+
+ +
+ {#if error} +
{error}
+ {/if} + + + + + + + + + +
+ + +
+
+
+
+ +