From 9938f479769cc55fbd72e5f3150c3ed4630ea22a Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 17 Jan 2024 11:52:37 -0600 Subject: [PATCH 1/5] Expand better --- islands/TodoList.tsx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/islands/TodoList.tsx b/islands/TodoList.tsx index 3612a69..2842745 100644 --- a/islands/TodoList.tsx +++ b/islands/TodoList.tsx @@ -2,6 +2,8 @@ import { Todo, UserWithTodos } from '@homeman/models.ts' import { JSX } from 'preact' import { Button } from '@homeman/components/Button.tsx' import { Avatar } from '@homeman/components/Avatar.tsx' +import { ChevronDoubleDownOutline, ChevronDownOutline } from 'preact-heroicons' +import { ChevronDownMiniSolid } from 'preact-heroicons' export interface Props { user: UserWithTodos @@ -90,14 +92,15 @@ export function TodoList( {doneTodos.length > 0 ? ( - - +{doneTodos.length} completed todos -
-
    - {doneTodos.map(todoItem)} -
-
-
+
+ + +{doneTodos.length} completed todos + + + +
) : ''} From 5e9cd1139dec1a33e757d7e05f12fe2186d58d46 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 17 Jan 2024 11:55:46 -0600 Subject: [PATCH 2/5] Trash stays upright --- islands/TodoList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/islands/TodoList.tsx b/islands/TodoList.tsx index bb18961..029d59f 100644 --- a/islands/TodoList.tsx +++ b/islands/TodoList.tsx @@ -111,7 +111,7 @@ export function TodoList( {doneTodos.length > 0 ? ( -
+
+{doneTodos.length} completed todos From 676e7777b4fdc8a758f870b978f4499ceefceb59 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 17 Jan 2024 15:10:28 -0600 Subject: [PATCH 3/5] WIP --- README.md | 17 +++++- components/Dialog.tsx | 2 +- islands/Dashboard.tsx | 121 +++++++++++++++++++++++++++++++++++++++- islands/Nav.tsx | 7 +++ islands/TodoList.tsx | 6 +- routes/api/todo.ts | 80 +++++++++++++++++++++++--- routes/api/todo/done.ts | 14 +++-- routes/api/user.ts | 56 +++++++++++++++++-- routes/index.tsx | 45 +++++++-------- 9 files changed, 299 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index 16dc38c..8ec336c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,17 @@ +# Homeman + +Homeman is short for "home management". It is a simple digital dashboard for +managing tasks within a home primarily geared towards planning and organizing +around a touch-capable display. + +**NOTE**: This project was _not_ created to be used outside my family, so some +things may be too inflexible for your use case. + +# Optimizations + +- Use atomic Deno KV operations? +- Event source streams share a single KV watch? + # Fresh project Your new Fresh project is ready to go. You can follow the Fresh "Getting @@ -9,7 +23,7 @@ Make sure to install Deno: https://deno.land/manual/getting_started/installation Then start the project: -``` +```bash deno task start ``` @@ -19,3 +33,4 @@ This will watch the project directory and restart as necessary. - https://github.com/briosheje/Fresh-Deno-Mongo-Docker-Todoapp/tree/main - https://hearthdisplay.com/ +- https://github.com/denoland/showcase_todo diff --git a/components/Dialog.tsx b/components/Dialog.tsx index d7fb690..ef1ad4b 100644 --- a/components/Dialog.tsx +++ b/components/Dialog.tsx @@ -30,7 +30,7 @@ export function Dialog( ref={self} >
-

{headerTitle}

+

{headerTitle}

@@ -126,7 +126,7 @@ export function Admin({ users, todos }: Props) { {avatarUrl == null ? 'None' - : } + : } #{color} @@ -158,12 +158,14 @@ export function Admin({ users, todos }: Props) { Description Assignee + Done At + Emoji Actions {Object.entries(todos).map(( - [_index, { id, description, assigneeUserId }], + [_index, { id, emoji, doneAt, description, assigneeUserId }], ) => ( {description} @@ -178,6 +180,8 @@ export function Admin({ users, todos }: Props) { ? 'Unassigned' : users[assigneeUserId]?.name} + {doneAt == null ? 'Not Done' : doneAt.toLocaleString()} + {emoji || 'No Emoji'}