From d9cd2bda6069916fee14d069eee12e8ede9d1e02 Mon Sep 17 00:00:00 2001 From: Julian Lobbes Date: Sun, 4 Jun 2023 03:26:46 +0100 Subject: [PATCH] squashme --- frontend/src/app.css | 7 ++ frontend/src/routes/todos/[todo]/+page.svelte | 71 ++++++++++++++++++- frontend/src/routes/users/[user]/+page.svelte | 2 +- .../routes/users/[user]/todos/+page.svelte | 2 +- 4 files changed, 77 insertions(+), 5 deletions(-) diff --git a/frontend/src/app.css b/frontend/src/app.css index eb3203c..814b822 100644 --- a/frontend/src/app.css +++ b/frontend/src/app.css @@ -197,4 +197,11 @@ @apply rounded-md; @apply p-1; } + + ul { + @apply list-inside list-disc; + } + ol { + @apply list-inside list-decimal; + } } diff --git a/frontend/src/routes/todos/[todo]/+page.svelte b/frontend/src/routes/todos/[todo]/+page.svelte index 9b59df5..f880aa2 100644 --- a/frontend/src/routes/todos/[todo]/+page.svelte +++ b/frontend/src/routes/todos/[todo]/+page.svelte @@ -1,11 +1,76 @@ -

{data.todo.title}

-
- {@html markdownToHtml(data.todo.description)} +
+
+
+
+ + +
+
+
+ {@html markdownToHtml(data.todo.description)} +
+
+ + diff --git a/frontend/src/routes/users/[user]/+page.svelte b/frontend/src/routes/users/[user]/+page.svelte index 55e1a45..3ccb370 100644 --- a/frontend/src/routes/users/[user]/+page.svelte +++ b/frontend/src/routes/users/[user]/+page.svelte @@ -22,7 +22,7 @@ -
+
{#if user.id === data.user.id}

My Profile

{:else} diff --git a/frontend/src/routes/users/[user]/todos/+page.svelte b/frontend/src/routes/users/[user]/todos/+page.svelte index cbde927..373091e 100644 --- a/frontend/src/routes/users/[user]/todos/+page.svelte +++ b/frontend/src/routes/users/[user]/todos/+page.svelte @@ -44,7 +44,7 @@ const table = { caption: user.id === data.user.id ? 'My TODOs' : `${data.user.first_name} ${data.user.last_name}'s TODOs`, - columns: columns, + columns: user.isAdmin ? columns : columns.slice(1, -1), getItemsEndpoint: { callable: readTodos, args: [