From 2e1583589ef158da175a06a124e50dd5574740fb Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 29 Sep 2020 10:19:04 +0100 Subject: [PATCH] organise async logic on homepage, style template cards and add images --- .../src/components/start/AppList.svelte | 40 +++++++++++++++---- .../src/components/start/Steps/Info.svelte | 7 ++-- .../src/components/start/TemplateList.svelte | 38 ++++++++++-------- packages/builder/src/pages/index.svelte | 36 +---------------- .../server/src/api/controllers/templates.js | 2 +- 5 files changed, 60 insertions(+), 63 deletions(-) diff --git a/packages/builder/src/components/start/AppList.svelte b/packages/builder/src/components/start/AppList.svelte index efd448b94a..0a87e63cbb 100644 --- a/packages/builder/src/components/start/AppList.svelte +++ b/packages/builder/src/components/start/AppList.svelte @@ -1,20 +1,44 @@
-
-
+ Your Apps + {#await promise} +
+ +
+ {:then apps} +
-
- {#each apps as app} - - {/each} +
+
+ {#each apps as app} + + {/each} +
-
+ {:catch err} +

{err}

+ {/await}
diff --git a/packages/server/src/api/controllers/templates.js b/packages/server/src/api/controllers/templates.js index c9750dee6f..c7be43b4e3 100644 --- a/packages/server/src/api/controllers/templates.js +++ b/packages/server/src/api/controllers/templates.js @@ -28,7 +28,7 @@ exports.downloadTemplate = async function(ctx) { } exports.exportTemplateFromApp = async function(ctx) { - const { appId, instanceId } = ctx.user.appId + const { appId, instanceId } = ctx.user const { templateName } = ctx.request.body await exportTemplateFromApp({