From 7ab4d5f3d3ed12b92882c83a880bdded9a309dfc Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Wed, 19 Jan 2022 18:29:09 +0000 Subject: [PATCH] remove uneeded app creation modal --- .../components/start/CreateAppModal.svelte | 83 +++++++------------ .../src/components/start/TemplateList.svelte | 69 --------------- .../pages/builder/portal/apps/index.svelte | 11 ++- 3 files changed, 38 insertions(+), 125 deletions(-) delete mode 100644 packages/builder/src/components/start/TemplateList.svelte diff --git a/packages/builder/src/components/start/CreateAppModal.svelte b/packages/builder/src/components/start/CreateAppModal.svelte index 178588f608..60065b6eef 100644 --- a/packages/builder/src/components/start/CreateAppModal.svelte +++ b/packages/builder/src/components/start/CreateAppModal.svelte @@ -11,7 +11,6 @@ import { capitalise } from "helpers" import { goto } from "@roxi/routify" import { APP_NAME_REGEX } from "constants" - import TemplateList from "./TemplateList.svelte" export let template export let inline @@ -147,58 +146,34 @@ } -{#if showTemplateSelection} - { - template = {} - return false - }} - showCancelButton={!inline} - showCloseIcon={!inline} - > - { - if (!selected) { - template = useImport ? { fromFile: true } : {} - return - } - template = selected + + {#if template?.fromFile} + { + $values.file = e.detail?.[0] + $touched.file = true }} /> - -{:else} - - {#if template?.fromFile} - { - $values.file = e.detail?.[0] - $touched.file = true - }} - /> - {/if} - ($touched.name = true)} - label="Name" - placeholder={$auth.user.firstName - ? `${$auth.user.firstName}'s app` - : "My app"} - /> - -{/if} + {/if} + ($touched.name = true)} + label="Name" + placeholder={$auth.user.firstName + ? `${$auth.user.firstName}'s app` + : "My app"} + /> + diff --git a/packages/builder/src/components/start/TemplateList.svelte b/packages/builder/src/components/start/TemplateList.svelte deleted file mode 100644 index 90573bddff..0000000000 --- a/packages/builder/src/components/start/TemplateList.svelte +++ /dev/null @@ -1,69 +0,0 @@ - - - -
onSelect(null)}> -
- -
- Start from scratch -

BLANK

-
-
onSelect(null, { useImport: true })} - > -
- -
- Import an app -

BLANK

-
-
- - diff --git a/packages/builder/src/pages/builder/portal/apps/index.svelte b/packages/builder/src/pages/builder/portal/apps/index.svelte index 4df434ecdd..31530c5ef9 100644 --- a/packages/builder/src/pages/builder/portal/apps/index.svelte +++ b/packages/builder/src/pages/builder/portal/apps/index.svelte @@ -78,6 +78,7 @@ } const initiateAppCreation = () => { + template = {} creationModal.show() creatingApp = true } @@ -304,10 +305,16 @@ Export apps {/if} - -