+
{todo.title}
- {formatRelative(subDays(new Date(), 6), todo.createdAt)}
Date: Tue, 8 Aug 2023 00:31:58 +0800
Subject: [PATCH 2/3] style: improve todo container style
---
packages/svelte-todo/src/routes/+page.svelte | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/packages/svelte-todo/src/routes/+page.svelte b/packages/svelte-todo/src/routes/+page.svelte
index 13d4440..fb21ce7 100644
--- a/packages/svelte-todo/src/routes/+page.svelte
+++ b/packages/svelte-todo/src/routes/+page.svelte
@@ -40,10 +40,10 @@
-
-
+
+
-
Pending
+ Pending
{#each $todosPending as todo}
@@ -51,9 +51,9 @@
{/each}
-
+
-
In Progress
+ In Progress
{#each $todosInProgress as todo}
@@ -61,9 +61,9 @@
{/each}
-
+
-
Done
+ Done
{#each $todosDone as todo}
@@ -72,7 +72,6 @@
-
Visit kit.svelte.dev to read the documentation
From 0d1e1699a5586b8e9898593d32dc80f5416396c4 Mon Sep 17 00:00:00 2001
From: directormac
Date: Tue, 8 Aug 2023 05:15:04 +0800
Subject: [PATCH 3/3] Fix date-fns
---
packages/svelte-todo/package.json | 1 +
packages/svelte-todo/pnpm-lock.yaml | 21 +++++++++++++++++++++
2 files changed, 22 insertions(+)
diff --git a/packages/svelte-todo/package.json b/packages/svelte-todo/package.json
index 676673d..0d7fa42 100644
--- a/packages/svelte-todo/package.json
+++ b/packages/svelte-todo/package.json
@@ -26,6 +26,7 @@
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"autoprefixer": "^10.4.14",
+ "date-fns": "^2.30.0",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-svelte": "^2.30.0",
diff --git a/packages/svelte-todo/pnpm-lock.yaml b/packages/svelte-todo/pnpm-lock.yaml
index 8f7a4c9..8670ab0 100644
--- a/packages/svelte-todo/pnpm-lock.yaml
+++ b/packages/svelte-todo/pnpm-lock.yaml
@@ -32,6 +32,9 @@ devDependencies:
autoprefixer:
specifier: ^10.4.14
version: 10.4.14(postcss@8.4.27)
+ date-fns:
+ specifier: ^2.30.0
+ version: 2.30.0
eslint:
specifier: ^8.28.0
version: 8.46.0
@@ -98,6 +101,13 @@ packages:
'@jridgewell/trace-mapping': 0.3.18
dev: true
+ /@babel/runtime@7.22.10:
+ resolution: {integrity: sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ==}
+ engines: {node: '>=6.9.0'}
+ dependencies:
+ regenerator-runtime: 0.14.0
+ dev: true
+
/@esbuild/android-arm64@0.18.18:
resolution: {integrity: sha512-dkAPYzRHq3dNXIzOyAknYOzsx8o3KWaNiuu56B2rP9IFPmFWMS58WQcTlUQi6iloku8ZyHHMluCe5sTWhKq/Yw==}
engines: {node: '>=12'}
@@ -998,6 +1008,13 @@ packages:
hasBin: true
dev: true
+ /date-fns@2.30.0:
+ resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==}
+ engines: {node: '>=0.11'}
+ dependencies:
+ '@babel/runtime': 7.22.10
+ dev: true
+
/debug@4.3.4:
resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==}
engines: {node: '>=6.0'}
@@ -2025,6 +2042,10 @@ packages:
picomatch: 2.3.1
dev: true
+ /regenerator-runtime@0.14.0:
+ resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==}
+ dev: true
+
/resolve-from@4.0.0:
resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==}
engines: {node: '>=4'}