From 844158bb3cfbade9f67d904dad480fc990ca64e9 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 24 May 2021 15:47:55 +0100 Subject: [PATCH] Add real updated timestamp to non-builder app list --- .../builder/src/pages/builder/apps/index.svelte | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/pages/builder/apps/index.svelte b/packages/builder/src/pages/builder/apps/index.svelte index 7311c112b8..5fb75a43be 100644 --- a/packages/builder/src/pages/builder/apps/index.svelte +++ b/packages/builder/src/pages/builder/apps/index.svelte @@ -2,7 +2,6 @@ import { Heading, Layout, - Select, Divider, ActionMenu, MenuItem, @@ -19,6 +18,7 @@ import { gradient } from "actions" import UpdateUserInfoModal from "components/settings/UpdateUserInfoModal.svelte" import ChangePasswordModal from "components/settings/ChangePasswordModal.svelte" + import { processStringSync } from "@budibase/string-templates" let loaded = false let userInfoModal @@ -83,7 +83,18 @@
{app.name} - 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}