|
|
@ -1,14 +1,9 @@ |
|
|
<script> |
|
|
<script> |
|
|
import { store } from "builderStore" |
|
|
import { store } from "builderStore" |
|
|
import Button from "components/common/Button.svelte" |
|
|
|
|
|
import ActionButton from "components/common/ActionButton.svelte" |
|
|
|
|
|
import ButtonGroup from "components/common/ButtonGroup.svelte" |
|
|
|
|
|
import ConfirmDialog from "components/common/ConfirmDialog.svelte" |
|
|
|
|
|
import { pipe } from "components/common/core" |
|
|
import { pipe } from "components/common/core" |
|
|
import UIkit from "uikit" |
|
|
|
|
|
import { isRootComponent } from "./pagesParsing/searchComponents" |
|
|
import { isRootComponent } from "./pagesParsing/searchComponents" |
|
|
import { splitName } from "./pagesParsing/splitRootComponentName.js" |
|
|
import { splitName } from "./pagesParsing/splitRootComponentName.js" |
|
|
import { Input, Select } from "@budibase/bbui" |
|
|
import { Input, Select, Modal, Button } from "@budibase/bbui" |
|
|
|
|
|
|
|
|
import { find, filter, some, map, includes } from "lodash/fp" |
|
|
import { find, filter, some, map, includes } from "lodash/fp" |
|
|
import { assign } from "lodash" |
|
|
import { assign } from "lodash" |
|
|
@ -72,34 +67,49 @@ |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<ConfirmDialog |
|
|
<Modal bind:this={dialog}> |
|
|
bind:this={dialog} |
|
|
<h2>New Screen</h2> |
|
|
title="New Screen" |
|
|
|
|
|
onCancel={cancel} |
|
|
<div class="modal-body"> |
|
|
onOk={save} |
|
|
<div data-cy="new-screen-dialog"> |
|
|
okText="Create Screen"> |
|
|
<div class="bb-margin-xl"> |
|
|
|
|
|
<Input label="Name" bind:value={name} /> |
|
|
<div data-cy="new-screen-dialog"> |
|
|
</div> |
|
|
<div class="bb-margin-xl"> |
|
|
|
|
|
<Input label="Name" bind:value={name} /> |
|
|
<div class="bb-margin-xl"> |
|
|
|
|
|
<Input |
|
|
|
|
|
label="Url" |
|
|
|
|
|
error={routeError} |
|
|
|
|
|
bind:value={route} |
|
|
|
|
|
on:change={routeChanged} /> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="bb-margin-xl"> |
|
|
|
|
|
<label>Layout Component</label> |
|
|
|
|
|
<Select bind:value={layoutComponent} secondary> |
|
|
|
|
|
{#each layoutComponents as { _component, name }} |
|
|
|
|
|
<option value={_component}>{name}</option> |
|
|
|
|
|
{/each} |
|
|
|
|
|
</Select> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="bb-margin-xl"> |
|
|
<Button secondary medium on:click={cancel}>Cancel</Button> |
|
|
<Input |
|
|
<Button blue medium on:click={save}>Create Screen</Button> |
|
|
label="Url" |
|
|
|
|
|
error={routeError} |
|
|
|
|
|
bind:value={route} |
|
|
|
|
|
on:change={routeChanged} /> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="bb-margin-xl"> |
|
|
</Modal> |
|
|
<label>Layout Component</label> |
|
|
|
|
|
<Select bind:value={layoutComponent} secondary> |
|
|
<style> |
|
|
{#each layoutComponents as { _component, name }} |
|
|
h2 { |
|
|
<option value={_component}>{name}</option> |
|
|
font-size: var(--font-size-xl); |
|
|
{/each} |
|
|
margin: 0; |
|
|
</Select> |
|
|
font-family: var(--font-sans); |
|
|
</div> |
|
|
font-weight: 600; |
|
|
</div> |
|
|
} |
|
|
|
|
|
|
|
|
</ConfirmDialog> |
|
|
.modal-body { |
|
|
|
|
|
margin-top: var(--spacing-m); |
|
|
|
|
|
margin-bottom: var(--spacing-m); |
|
|
|
|
|
} |
|
|
|
|
|
</style> |
|
|
|