From ecfd41d535d3bc15d4f4f5915c16e8a5e3a85389 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 24 May 2021 14:11:45 +0100 Subject: [PATCH] Add real updated timestamp to app table view --- packages/builder/src/components/start/AppCard.svelte | 2 -- packages/builder/src/components/start/AppRow.svelte | 9 ++++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/components/start/AppCard.svelte b/packages/builder/src/components/start/AppCard.svelte index c5937c5637..e41ffc4469 100644 --- a/packages/builder/src/components/start/AppCard.svelte +++ b/packages/builder/src/components/start/AppCard.svelte @@ -9,8 +9,6 @@ StatusLight, } from "@budibase/bbui" import { gradient } from "actions" - import { auth } from "stores/portal" - import { AppStatus } from "constants" import { processStringSync } from "@budibase/string-templates" export let app diff --git a/packages/builder/src/components/start/AppRow.svelte b/packages/builder/src/components/start/AppRow.svelte index 8bc24be624..85bad84376 100644 --- a/packages/builder/src/components/start/AppRow.svelte +++ b/packages/builder/src/components/start/AppRow.svelte @@ -8,6 +8,7 @@ MenuItem, StatusLight, } from "@budibase/bbui" + import { processStringSync } from "@budibase/string-templates" export let app export let exportApp @@ -27,7 +28,13 @@
- Updated {Math.round(Math.random() * 10 + 1)} months ago + {#if app.updatedAt} + {processStringSync("Updated {{ duration time 'millisecond' }} ago", { + time: new Date().getTime() - new Date(app.updatedAt).getTime(), + })} + {:else} + Never updated + {/if}