|
|
@ -47,9 +47,9 @@ |
|
|
.test( |
|
|
.test( |
|
|
"non-existing-app-name", |
|
|
"non-existing-app-name", |
|
|
"App with same name already exists. Please try another app name.", |
|
|
"App with same name already exists. Please try another app name.", |
|
|
value => |
|
|
(value) => |
|
|
!existingAppNames.some( |
|
|
!existingAppNames.some( |
|
|
appName => appName.toLowerCase() === value.toLowerCase() |
|
|
(appName) => appName.toLowerCase() === value.toLowerCase() |
|
|
) |
|
|
) |
|
|
) |
|
|
) |
|
|
} |
|
|
} |
|
|
@ -57,11 +57,11 @@ |
|
|
|
|
|
|
|
|
const checkValidity = async (values, validator) => { |
|
|
const checkValidity = async (values, validator) => { |
|
|
const obj = object().shape(validator) |
|
|
const obj = object().shape(validator) |
|
|
Object.keys(validator).forEach(key => ($errors[key] = null)) |
|
|
Object.keys(validator).forEach((key) => ($errors[key] = null)) |
|
|
try { |
|
|
try { |
|
|
await obj.validate(values, { abortEarly: false }) |
|
|
await obj.validate(values, { abortEarly: false }) |
|
|
} catch (validationErrors) { |
|
|
} catch (validationErrors) { |
|
|
validationErrors.inner.forEach(error => { |
|
|
validationErrors.inner.forEach((error) => { |
|
|
$errors[error.path] = capitalise(error.message) |
|
|
$errors[error.path] = capitalise(error.message) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
@ -129,13 +129,14 @@ |
|
|
<Indicator |
|
|
<Indicator |
|
|
active={$currentStep === i} |
|
|
active={$currentStep === i} |
|
|
done={i < $currentStep} |
|
|
done={i < $currentStep} |
|
|
step={i + 1} /> |
|
|
step={i + 1} |
|
|
|
|
|
/> |
|
|
{/each} |
|
|
{/each} |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="body"> |
|
|
<div class="body"> |
|
|
<div class="heading"> |
|
|
<div class="heading"> |
|
|
<Heading h2 l>Get started with Budibase</Heading> |
|
|
<Heading size="L">Get started with Budibase</Heading> |
|
|
</div> |
|
|
</div> |
|
|
<div class="step"> |
|
|
<div class="step"> |
|
|
{#each steps as component, i (i)} |
|
|
{#each steps as component, i (i)} |
|
|
@ -145,7 +146,8 @@ |
|
|
{template} |
|
|
{template} |
|
|
{values} |
|
|
{values} |
|
|
{errors} |
|
|
{errors} |
|
|
{touched} /> |
|
|
{touched} |
|
|
|
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
{/each} |
|
|
{/each} |
|
|
</div> |
|
|
</div> |
|
|
@ -163,8 +165,9 @@ |
|
|
medium |
|
|
medium |
|
|
cta |
|
|
cta |
|
|
on:click={createNewApp} |
|
|
on:click={createNewApp} |
|
|
disabled={!valid || submitting}> |
|
|
disabled={!valid || submitting} |
|
|
{submitting ? 'Loading...' : 'Submit'} |
|
|
> |
|
|
|
|
|
{submitting ? "Loading..." : "Submit"} |
|
|
</Button> |
|
|
</Button> |
|
|
{/if} |
|
|
{/if} |
|
|
</div> |
|
|
</div> |
|
|
|