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 1ebe75af35
commit b4c0191e2b
1 changed files with 13 additions and 2 deletions

View File

@ -2,7 +2,6 @@
import { import {
Heading, Heading,
Layout, Layout,
Select,
Divider, Divider,
ActionMenu, ActionMenu,
MenuItem, MenuItem,
@ -19,6 +18,7 @@
import { gradient } from "actions" import { gradient } from "actions"
import UpdateUserInfoModal from "components/settings/UpdateUserInfoModal.svelte" import UpdateUserInfoModal from "components/settings/UpdateUserInfoModal.svelte"
import ChangePasswordModal from "components/settings/ChangePasswordModal.svelte" import ChangePasswordModal from "components/settings/ChangePasswordModal.svelte"
import { processStringSync } from "@budibase/string-templates"
let loaded = false let loaded = false
let userInfoModal let userInfoModal
@ -83,7 +83,18 @@
<div class="app-info"> <div class="app-info">
<Heading size="XS">{app.name}</Heading> <Heading size="XS">{app.name}</Heading>
<Body size="S"> <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> </Body>
</div> </div>
<Icon name="ChevronRight" /> <Icon name="ChevronRight" />