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 () => {
|
onMount(async () => {
|
||||||
await organisation.init()
|
await organisation.init()
|
||||||
await apps.load(AppStatus.DEV)
|
await apps.load()
|
||||||
loaded = true
|
loaded = true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
$: publishedApps = $apps.filter(app => app.status === AppStatus.DEPLOYED)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if $auth.user && loaded}
|
{#if $auth.user && loaded}
|
||||||
|
@ -71,17 +73,17 @@
|
||||||
</ActionMenu>
|
</ActionMenu>
|
||||||
</div>
|
</div>
|
||||||
<Divider />
|
<Divider />
|
||||||
{#if $apps.length}
|
{#if publishedApps.length}
|
||||||
<Heading>Apps</Heading>
|
<Heading>Apps</Heading>
|
||||||
<div class="group">
|
<div class="group">
|
||||||
<Layout gap="S" noPadding>
|
<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}`}>
|
<a class="app" target="_blank" href={`/${app.appId}`}>
|
||||||
<div class="preview" use:gradient={{ seed: app.name }} />
|
<div class="preview" use:gradient={{ seed: app.name }} />
|
||||||
<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">
|
||||||
Edited {Math.round(Math.random() * 10 + 1)} months ago
|
Updated {Math.round(Math.random() * 10 + 1)} months ago
|
||||||
</Body>
|
</Body>
|
||||||
</div>
|
</div>
|
||||||
<Icon name="ChevronRight" />
|
<Icon name="ChevronRight" />
|
||||||
|
|
Loading…
Reference in New Issue