Merge template and index page styles with new BBUI
This commit is contained in:
parent
68a03eceb4
commit
701786dc25
|
@ -19,7 +19,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="root">
|
<div class="root">
|
||||||
<Heading medium black>Your Apps</Heading>
|
<Heading lh medium black>Your Apps</Heading>
|
||||||
{#await promise}
|
{#await promise}
|
||||||
<div class="spinner-container">
|
<div class="spinner-container">
|
||||||
<Spinner size="30" />
|
<Spinner size="30" />
|
||||||
|
@ -48,8 +48,4 @@
|
||||||
grid-gap: var(--layout-m);
|
grid-gap: var(--layout-m);
|
||||||
justify-content: start;
|
justify-content: start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.root {
|
|
||||||
margin: 20px 80px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -216,38 +216,43 @@
|
||||||
step={i + 1} />
|
step={i + 1} />
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
<div class="step">
|
<div class="body">
|
||||||
<Form bind:values={$createAppStore.values}>
|
<div class="heading">
|
||||||
{#each steps as step, i (i)}
|
<h3 class="header">Get Started with Budibase</h3>
|
||||||
<div class:hidden={$createAppStore.currentStep !== i}>
|
</div>
|
||||||
<svelte:component
|
<div class="step">
|
||||||
this={step.component}
|
<Form bind:values={$createAppStore.values}>
|
||||||
{template}
|
{#each steps as step, i (i)}
|
||||||
{validationErrors}
|
<div class:hidden={$createAppStore.currentStep !== i}>
|
||||||
options={step.options}
|
<svelte:component
|
||||||
name={step.name} />
|
this={step.component}
|
||||||
</div>
|
{template}
|
||||||
{/each}
|
{validationErrors}
|
||||||
</Form>
|
options={step.options}
|
||||||
</div>
|
name={step.name} />
|
||||||
<div class="footer">
|
</div>
|
||||||
{#if $createAppStore.currentStep > 0}
|
{/each}
|
||||||
<Button medium secondary on:click={back}>Back</Button>
|
</Form>
|
||||||
{/if}
|
</div>
|
||||||
{#if $createAppStore.currentStep < steps.length - 1}
|
<div class="footer">
|
||||||
<Button medium blue on:click={next} disabled={!currentStepIsValid}>
|
{#if $createAppStore.currentStep > 0}
|
||||||
Next
|
<Button medium secondary on:click={back}>Back</Button>
|
||||||
</Button>
|
{/if}
|
||||||
{/if}
|
{#if $createAppStore.currentStep < steps.length - 1}
|
||||||
{#if $createAppStore.currentStep === steps.length - 1}
|
<Button medium blue on:click={next} disabled={!currentStepIsValid}>
|
||||||
<Button
|
Next
|
||||||
medium
|
</Button>
|
||||||
blue
|
{/if}
|
||||||
on:click={signUp}
|
{#if $createAppStore.currentStep === steps.length - 1}
|
||||||
disabled={!fullFormIsValid || submitting}>
|
<Button
|
||||||
{submitting ? 'Loading...' : 'Submit'}
|
medium
|
||||||
</Button>
|
blue
|
||||||
{/if}
|
on:click={signUp}
|
||||||
|
disabled={!fullFormIsValid || submitting}>
|
||||||
|
{submitting ? 'Loading...' : 'Submit'}
|
||||||
|
</Button>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<img src="/_builder/assets/bb-logo.svg" alt="budibase icon" />
|
<img src="/_builder/assets/bb-logo.svg" alt="budibase icon" />
|
||||||
{#if submitting}
|
{#if submitting}
|
||||||
|
|
|
@ -1,20 +1,22 @@
|
||||||
<script>
|
<script>
|
||||||
import { Input, Heading, Body } from "@budibase/bbui"
|
import { Label, Heading, Input } from "@budibase/bbui"
|
||||||
export let validationErrors
|
export let validationErrors
|
||||||
export let template
|
export let template
|
||||||
|
|
||||||
let blurred = { appName: false }
|
let blurred = { appName: false }
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if template}
|
|
||||||
<Heading small black>Selected Template</Heading>
|
|
||||||
<Body>{template.name}</Body>
|
|
||||||
{/if}
|
|
||||||
<h2>Create your web app</h2>
|
<h2>Create your web app</h2>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
{#if template}
|
||||||
|
<div class="template">
|
||||||
|
<Label extraSmall grey>Selected Template</Label>
|
||||||
|
<Heading small>{template.name}</Heading>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
<Input
|
<Input
|
||||||
on:input={() => (blurred.appName = true)}
|
on:input={() => (blurred.appName = true)}
|
||||||
label="Web app name"
|
label="Web App Name"
|
||||||
name="applicationName"
|
name="applicationName"
|
||||||
placeholder="Enter name of your web application"
|
placeholder="Enter name of your web application"
|
||||||
type="name"
|
type="name"
|
||||||
|
@ -24,6 +26,11 @@
|
||||||
<style>
|
<style>
|
||||||
.container {
|
.container {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-gap: 40px;
|
grid-gap: var(--spacing-xl);
|
||||||
|
}
|
||||||
|
|
||||||
|
.template :global(label) {
|
||||||
|
/* Fix layout due to LH 0 on heading */
|
||||||
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
placeholder="Password"
|
placeholder="Password"
|
||||||
type="pasword"
|
type="pasword"
|
||||||
error={blurred.password && validationErrors.password} />
|
error={blurred.password && validationErrors.password} />
|
||||||
<Select secondary name="accessLevelId">
|
<Select label="Access Level" secondary name="accessLevelId">
|
||||||
<option value="ADMIN">Admin</option>
|
<option value="ADMIN">Admin</option>
|
||||||
<option value="POWER_USER">Power User</option>
|
<option value="POWER_USER">Power User</option>
|
||||||
</Select>
|
</Select>
|
||||||
|
@ -30,6 +30,6 @@
|
||||||
<style>
|
<style>
|
||||||
.container {
|
.container {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-gap: 40px;
|
grid-gap: var(--spacing-xl);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
import { Button, Heading, Body } from "@budibase/bbui"
|
import { Button, Heading, Body, Spacer } from "@budibase/bbui"
|
||||||
import AppCard from "./AppCard.svelte"
|
import AppCard from "./AppCard.svelte"
|
||||||
import Spinner from "components/common/Spinner.svelte"
|
import Spinner from "components/common/Spinner.svelte"
|
||||||
import api from "builderStore/api"
|
import api from "builderStore/api"
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="root">
|
<div class="root">
|
||||||
<Heading medium black>Start With a Template</Heading>
|
<Heading lh medium black>Start With a Template</Heading>
|
||||||
{#await templatesPromise}
|
{#await templatesPromise}
|
||||||
<div class="spinner-container">
|
<div class="spinner-container">
|
||||||
<Spinner size="30" />
|
<Spinner size="30" />
|
||||||
|
@ -24,11 +24,12 @@
|
||||||
<div class="templates">
|
<div class="templates">
|
||||||
{#each templates as template}
|
{#each templates as template}
|
||||||
<div class="templates-card">
|
<div class="templates-card">
|
||||||
<Heading black medium>{template.name}</Heading>
|
<Heading black small>{template.name}</Heading>
|
||||||
|
<Spacer small />
|
||||||
<Body medium grey>{template.category}</Body>
|
<Body medium grey>{template.category}</Body>
|
||||||
<Body small black>{template.description}</Body>
|
<Body lh small black>{template.description}</Body>
|
||||||
<div>
|
<div>
|
||||||
<img src={template.image} width="300" />
|
<img src={template.image} width="100%" />
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<div class="card-footer">
|
||||||
<Button secondary on:click={() => onSelect(template)}>
|
<Button secondary on:click={() => onSelect(template)}>
|
||||||
|
@ -68,8 +69,4 @@
|
||||||
color: var(--ink);
|
color: var(--ink);
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
}
|
}
|
||||||
|
|
||||||
.root {
|
|
||||||
margin: 20px 80px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
import AppList from "components/start/AppList.svelte"
|
import AppList from "components/start/AppList.svelte"
|
||||||
import { onMount } from "svelte"
|
import { onMount } from "svelte"
|
||||||
import ActionButton from "components/common/ActionButton.svelte"
|
import ActionButton from "components/common/ActionButton.svelte"
|
||||||
|
import { get } from "builderStore/api"
|
||||||
import Spinner from "components/common/Spinner.svelte"
|
import Spinner from "components/common/Spinner.svelte"
|
||||||
import CreateAppModal from "components/start/CreateAppModal.svelte"
|
import CreateAppModal from "components/start/CreateAppModal.svelte"
|
||||||
import { Button, Heading } from "@budibase/bbui"
|
import { Button, Heading } from "@budibase/bbui"
|
||||||
|
@ -13,6 +14,7 @@
|
||||||
|
|
||||||
let promise = getApps()
|
let promise = getApps()
|
||||||
let hasKey
|
let hasKey
|
||||||
|
let template
|
||||||
let modalVisible = false
|
let modalVisible = false
|
||||||
|
|
||||||
async function getApps() {
|
async function getApps() {
|
||||||
|
@ -44,41 +46,49 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function selectTemplate(newTemplate) {
|
||||||
|
template = newTemplate
|
||||||
|
modalVisible = true
|
||||||
|
}
|
||||||
|
|
||||||
checkIfKeysAndApps()
|
checkIfKeysAndApps()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="header">
|
<div class="container">
|
||||||
<Heading medium black>Welcome to the Budibase Beta</Heading>
|
<div class="header">
|
||||||
<Button primary purple on:click={() => (modalVisible = true)}>
|
<Heading medium black>Welcome to the Budibase Beta</Heading>
|
||||||
Create New Web App
|
<Button primary purple on:click={() => (modalVisible = true)}>
|
||||||
</Button>
|
Create New Web App
|
||||||
</div>
|
</Button>
|
||||||
|
|
||||||
<div class="banner">
|
|
||||||
<img src="/_builder/assets/orange-landscape.png" alt="rocket" />
|
|
||||||
<div class="banner-content">
|
|
||||||
Every accomplishment starts with a decision to try.
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<TemplateList onSelect={() => (modalVisible = true)} />
|
<div class="banner">
|
||||||
<AppList />
|
<img src="/_builder/assets/orange-landscape.png" alt="rocket" />
|
||||||
{#if modalVisible}
|
<div class="banner-content">
|
||||||
<CreateAppModal bind:visible={modalVisible} {hasKey} {template} />
|
Every accomplishment starts with a decision to try.
|
||||||
{/if}
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<TemplateList onSelect={selectTemplate} />
|
||||||
|
|
||||||
|
<AppList />
|
||||||
|
|
||||||
|
{#if modalVisible}
|
||||||
|
<CreateAppModal bind:visible={modalVisible} {hasKey} {template} />
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.container {
|
||||||
|
display: grid;
|
||||||
|
gap: var(--spacing-xl);
|
||||||
|
margin: 40px 80px;
|
||||||
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 40px 80px 0px 80px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.welcome {
|
|
||||||
font-size: var(--font-size-3xl);
|
|
||||||
color: var(--ink);
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner {
|
.banner {
|
||||||
|
@ -88,7 +98,6 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: white;
|
color: white;
|
||||||
margin: 20px 80px 40px 80px;
|
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue