From 468d12879c8e0d9757d07b197f07504996977878 Mon Sep 17 00:00:00 2001 From: Gisle Aune Date: Wed, 13 Jan 2021 23:08:17 +0100 Subject: [PATCH] make time left indicators update every minute, and fix segmented progress bars. --- svelte-ui/src/components/DaysLeft.svelte | 10 +++++-- svelte-ui/src/components/EveryMinute.svelte | 31 +++++++++++++++++++++ svelte-ui/src/components/GoalEntry.svelte | 9 ++++-- svelte-ui/src/components/Progress.svelte | 4 +-- svelte-ui/src/pages/FrontPage.svelte | 4 +-- 5 files changed, 48 insertions(+), 10 deletions(-) create mode 100644 svelte-ui/src/components/EveryMinute.svelte diff --git a/svelte-ui/src/components/DaysLeft.svelte b/svelte-ui/src/components/DaysLeft.svelte index 104f62e..9a1c1af 100644 --- a/svelte-ui/src/components/DaysLeft.svelte +++ b/svelte-ui/src/components/DaysLeft.svelte @@ -1,4 +1,6 @@ + {#if (overdue)} {amountStr} {unit} ago diff --git a/svelte-ui/src/components/EveryMinute.svelte b/svelte-ui/src/components/EveryMinute.svelte new file mode 100644 index 0000000..4e1e0b9 --- /dev/null +++ b/svelte-ui/src/components/EveryMinute.svelte @@ -0,0 +1,31 @@ + + + + \ No newline at end of file diff --git a/svelte-ui/src/components/GoalEntry.svelte b/svelte-ui/src/components/GoalEntry.svelte index bc95e07..51e6220 100644 --- a/svelte-ui/src/components/GoalEntry.svelte +++ b/svelte-ui/src/components/GoalEntry.svelte @@ -1,6 +1,7 @@ - + 50) { - nonSegmented = true; - } + nonSegmented = (target >= 50); } diff --git a/svelte-ui/src/pages/FrontPage.svelte b/svelte-ui/src/pages/FrontPage.svelte index d49c635..6ed8bd3 100644 --- a/svelte-ui/src/pages/FrontPage.svelte +++ b/svelte-ui/src/pages/FrontPage.svelte @@ -41,7 +41,7 @@ fakeProject = { id: "P_fakeProject", active: true, - createdTime: new Date().toISOString(), + createdTime: "1970-01-01T00:00:00Z", description: "", icon: "list", name: "Individual Tasks", @@ -53,8 +53,6 @@ if (fakeProject.tasks.length > 0) { fakeProject.endTime = fakeProject.tasks[0].endTime; } - - console.log(fakeProject, $fpTaskStore); } $: {