Add real updated timestamp to non-builder app list

This commit is contained in:
Andrew Kingston 2021-05-24 15:47:55 +01:00
parent bba1cea7b3
commit 844158bb3c
1 changed files with 13 additions and 2 deletions

View File

@ -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 @@
<div class="app-info">
<Heading size="XS">{app.name}</Heading>
<Body size="S">
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}
</Body>
</div>
<Icon name="ChevronRight" />