diff --git a/packages/builder/assets/budiworld.webp b/packages/builder/assets/budiworld.webp new file mode 100644 index 0000000000..347036a797 Binary files /dev/null and b/packages/builder/assets/budiworld.webp differ diff --git a/packages/builder/src/components/start/CreateAppModal.svelte b/packages/builder/src/components/start/CreateAppModal.svelte index 9ce9d746d7..ada53c5dd3 100644 --- a/packages/builder/src/components/start/CreateAppModal.svelte +++ b/packages/builder/src/components/start/CreateAppModal.svelte @@ -31,11 +31,14 @@ APP_NAME_REGEX, "App name must be letters, numbers and spaces only" ), - file: template ? mixed().required("Please choose a file to import") : null, + file: template?.fromFile + ? mixed().required("Please choose a file to import") + : null, } let submitting = false let valid = false + $: checkValidity($values, validator) onMount(async () => { @@ -73,7 +76,7 @@ submitting = true // Check a template exists if we are important - if (template && !$values.file) { + if (template?.fromFile && !$values.file) { $errors.file = "Please choose a file to import" valid = false submitting = false @@ -134,12 +137,12 @@ - {#if template} + {#if template?.fromFile} + import { ModalContent, Body } from "@budibase/bbui" + import { auth } from "stores/portal" + import TemplateList from "./TemplateList.svelte" + import CreateAppModal from "./CreateAppModal.svelte" + import BudiWorldImage from "assets/budiworld.webp" + + let step = 0 + let template + + function nextStep() { + step += 1 + } + + function selectTemplate(selectedTemplate) { + // get the template from the URL + template = selectedTemplate + nextStep() + } + + +{#if step === 0} + { + nextStep() + return false + }} + > + +

Welcome to Budibase!

+ +

+ We're different from other development tools in some really special + ways, so we'd like to take you through them. +

+ + Budibase community world +
+{:else if step === 1} + { + nextStep() + return false + }} + > + + One of the coolest things about Budibase is that you don't have to start + from scratch. Simply select a template below, and get to work. + + + +{:else if step === 2} + +{/if} + + diff --git a/packages/builder/src/components/start/TemplateList.svelte b/packages/builder/src/components/start/TemplateList.svelte index 7e7b5c74d5..38fbb76f62 100644 --- a/packages/builder/src/components/start/TemplateList.svelte +++ b/packages/builder/src/components/start/TemplateList.svelte @@ -1,5 +1,5 @@
- Start With a Template {#await templatesPromise}
@@ -23,16 +22,14 @@
{#each templates as template}
- {template.name} - {template.category} + template onSelect(template)} + src={template.image} + width="100%" + /> + {template.name} {template.description} -
template
-
{/each}
@@ -44,19 +41,20 @@ diff --git a/packages/builder/src/pages/builder/apps/index.svelte b/packages/builder/src/pages/builder/apps/index.svelte index 2f9f87d4f6..e1148fd859 100644 --- a/packages/builder/src/pages/builder/apps/index.svelte +++ b/packages/builder/src/pages/builder/apps/index.svelte @@ -159,8 +159,6 @@ cursor: pointer; filter: brightness(110%); } - .group { - } .app { display: grid; grid-template-columns: auto 1fr auto; diff --git a/packages/builder/src/pages/builder/portal/apps/index.svelte b/packages/builder/src/pages/builder/portal/apps/index.svelte index 840298e3f9..4f1da5916f 100644 --- a/packages/builder/src/pages/builder/portal/apps/index.svelte +++ b/packages/builder/src/pages/builder/portal/apps/index.svelte @@ -16,6 +16,7 @@ } from "@budibase/bbui" import CreateAppModal from "components/start/CreateAppModal.svelte" import UpdateAppModal from "components/start/UpdateAppModal.svelte" + import OnboardingModal from "components/start/OnboardingModal.svelte" import { del } from "builderStore/api" import { onMount } from "svelte" import { apps, auth, admin } from "stores/portal" @@ -34,6 +35,7 @@ let updatingModal let deletionModal let unpublishModal + let onboardingModal let creatingApp = false let loaded = false let searchTerm = "" @@ -197,6 +199,9 @@ onMount(async () => { await apps.load() loaded = true + // TODO: only show when they have not onboarded yet + // If apps = 0 or user isn't onboarded? + onboardingModal.show() }) @@ -316,6 +321,9 @@ + + +