Update normal user home screen to reflect changes with app fetching
This commit is contained in:
parent
613841e7dd
commit
93d77d058c
|
@ -26,9 +26,11 @@
|
|||
|
||||
onMount(async () => {
|
||||
await organisation.init()
|
||||
await apps.load(AppStatus.DEV)
|
||||
await apps.load()
|
||||
loaded = true
|
||||
})
|
||||
|
||||
$: publishedApps = $apps.filter(app => app.status === AppStatus.DEPLOYED)
|
||||
</script>
|
||||
|
||||
{#if $auth.user && loaded}
|
||||
|
@ -71,17 +73,17 @@
|
|||
</ActionMenu>
|
||||
</div>
|
||||
<Divider />
|
||||
{#if $apps.length}
|
||||
{#if publishedApps.length}
|
||||
<Heading>Apps</Heading>
|
||||
<div class="group">
|
||||
<Layout gap="S" noPadding>
|
||||
{#each $apps as app, idx (app.appId)}
|
||||
{#each publishedApps as app, idx (app.appId)}
|
||||
<a class="app" target="_blank" href={`/${app.appId}`}>
|
||||
<div class="preview" use:gradient={{ seed: app.name }} />
|
||||
<div class="app-info">
|
||||
<Heading size="XS">{app.name}</Heading>
|
||||
<Body size="S">
|
||||
Edited {Math.round(Math.random() * 10 + 1)} months ago
|
||||
Updated {Math.round(Math.random() * 10 + 1)} months ago
|
||||
</Body>
|
||||
</div>
|
||||
<Icon name="ChevronRight" />
|
||||
|
|
Loading…
Reference in New Issue