replace remix

This commit is contained in:
Keviin Åberg Kultalahti 2021-04-23 11:55:27 +02:00
parent c592e09c71
commit 70e08e27e7
4 changed files with 18 additions and 26 deletions

View File

@ -1,5 +1,5 @@
<script> <script>
import { Button, Input } from "@budibase/bbui" import { Icon, Button, Input } from "@budibase/bbui"
export let defaults export let defaults
export let object = defaults || {} export let object = defaults || {}
@ -28,7 +28,7 @@
<Input placeholder="Key" bind:value={field.name} /> <Input placeholder="Key" bind:value={field.name} />
<Input placeholder="Value" bind:value={field.value} /> <Input placeholder="Value" bind:value={field.value} />
{#if !readOnly} {#if !readOnly}
<i class="ri-close-circle-fill" on:click={() => deleteEntry(idx)} /> <Icon hoverable name="Close" on:click={() => deleteEntry(idx)} />
{/if} {/if}
{/each} {/each}
</div> </div>

View File

@ -1,5 +1,5 @@
<script> <script>
import { Body, Button, Input, Heading, Spacer } from "@budibase/bbui" import { Icon, Body, Button, Input, Heading, Spacer } from "@budibase/bbui"
import { import {
readableToRuntimeBinding, readableToRuntimeBinding,
runtimeToReadableBinding, runtimeToReadableBinding,
@ -67,9 +67,7 @@
value={runtimeToReadableBinding(bindings, customParams?.[parameter.name])} value={runtimeToReadableBinding(bindings, customParams?.[parameter.name])}
{bindings} /> {bindings} />
{:else} {:else}
<i <Icon hoverable name="Close" on:click={() => deleteQueryParameter(idx)} />
class="ri-close-circle-line delete"
on:click={() => deleteQueryParameter(idx)} />
{/if} {/if}
{/each} {/each}
</div> </div>

View File

@ -1,6 +1,7 @@
<script> <script>
import { goto } from "@roxi/routify" import { goto } from "@roxi/routify"
import { import {
Icon,
Select, Select,
Button, Button,
Body, Body,
@ -9,7 +10,7 @@
Heading, Heading,
Spacer, Spacer,
Tabs, Tabs,
Tab Tab,
} from "@budibase/bbui" } from "@budibase/bbui"
import { notifications, Divider } from "@budibase/bbui" import { notifications, Divider } from "@budibase/bbui"
import api from "builderStore/api" import api from "builderStore/api"
@ -31,7 +32,7 @@
{ label: "Datetime", value: "DATETIME" }, { label: "Datetime", value: "DATETIME" },
] ]
$: datasource = $datasources.list.find(ds => ds._id === query.datasourceId) $: datasource = $datasources.list.find((ds) => ds._id === query.datasourceId)
$: query.schema = fields.reduce( $: query.schema = fields.reduce(
(acc, next) => ({ (acc, next) => ({
...acc, ...acc,
@ -87,7 +88,7 @@
// Assume all the fields are strings and create a basic schema from the // Assume all the fields are strings and create a basic schema from the
// unique fields returned by the server // unique fields returned by the server
fields = json.schemaFields.map(field => ({ fields = json.schemaFields.map((field) => ({
name: field, name: field,
type: "STRING", type: "STRING",
})) }))
@ -129,7 +130,9 @@
<Select <Select
bind:value={query.queryVerb} bind:value={query.queryVerb}
options={Object.keys(queryConfig)} options={Object.keys(queryConfig)}
getOptionLabel={verb => queryConfig[verb]?.displayName || capitalise(verb)} /> getOptionLabel={(verb) =>
queryConfig[verb]?.displayName || capitalise(verb)}
/>
</div> </div>
<Spacer extraLarge /> <Spacer extraLarge />
<Divider /> <Divider />
@ -152,7 +155,8 @@
{query} {query}
height={300} height={300}
schema={queryConfig[query.queryVerb]} schema={queryConfig[query.queryVerb]}
bind:parameters /> bind:parameters
/>
<Spacer extraLarge /> <Spacer extraLarge />
<Divider /> <Divider />
<Spacer extraLarge /> <Spacer extraLarge />
@ -163,7 +167,8 @@
secondary secondary
thin thin
disabled={data.length === 0 || !query.name} disabled={data.length === 0 || !query.name}
on:click={saveQuery}> on:click={saveQuery}
>
Save Query Save Query
</Button> </Button>
<Spacer medium /> <Spacer medium />
@ -195,9 +200,7 @@
<div class="field"> <div class="field">
<Input placeholder="Field Name" bind:value={field.name} /> <Input placeholder="Field Name" bind:value={field.name} />
<Select bind:value={field.type} options={typeOptions} /> <Select bind:value={field.type} options={typeOptions} />
<i <Icon name="bleClose" on:click={() => deleteField(idx)} />
class="ri-close-circle-line delete"
on:click={() => deleteField(idx)} />
</div> </div>
{/each} {/each}
<Spacer extraLarge /> <Spacer extraLarge />

View File

@ -1,5 +1,5 @@
<script> <script>
import { Label, Popover } from "@budibase/bbui" import { Icon, Label, Popover } from "@budibase/bbui"
import ThemeEditor from "./ThemeEditor.svelte" import ThemeEditor from "./ThemeEditor.svelte"
let anchor let anchor
@ -7,7 +7,7 @@
</script> </script>
<div class="topnavitemright" on:click={popover.show} bind:this={anchor}> <div class="topnavitemright" on:click={popover.show} bind:this={anchor}>
<i class="ri-paint-fill" /> <Icon hoverable name="ColorFill" />
</div> </div>
<div class="dropdown"> <div class="dropdown">
<Popover bind:this={popover} {anchor} align="right"> <Popover bind:this={popover} {anchor} align="right">
@ -22,11 +22,6 @@
.dropdown { .dropdown {
z-index: 2; z-index: 2;
} }
i {
font-size: 18px;
color: var(--grey-7);
}
.topnavitemright { .topnavitemright {
cursor: pointer; cursor: pointer;
color: var(--grey-7); color: var(--grey-7);
@ -40,10 +35,6 @@
height: 24px; height: 24px;
width: 24px; width: 24px;
} }
.topnavitemright:hover i {
color: var(--ink);
}
.content { .content {
padding: var(--spacing-xl); padding: var(--spacing-xl);
} }