actually convert table command buttons

This commit is contained in:
Keviin Åberg Kultalahti 2021-04-08 18:10:18 +02:00
parent d8b352a9ae
commit f72dda18de
18 changed files with 52 additions and 87 deletions

View File

@ -14,3 +14,10 @@
<NotificationDisplay /> <NotificationDisplay />
<Router {routes} {config} /> <Router {routes} {config} />
<div class="modal-container" />
<style>
.modal-container {
position: absolute;
}
</style>

View File

@ -92,7 +92,7 @@
</div> </div>
{/each} {/each}
{#if stepId === 'WEBHOOK'} {#if stepId === 'WEBHOOK'}
<Button wide secondary on:click={() => webhookModal.show()}> <Button type="secondary" on:click={() => webhookModal.show()}>
Set Up Webhook Set Up Webhook
</Button> </Button>
{/if} {/if}

View File

@ -65,7 +65,7 @@
{webhookModal} /> {webhookModal} />
{:else if $automationStore.selectedAutomation} {:else if $automationStore.selectedAutomation}
<div class="block-label">{automation.name}</div> <div class="block-label">{automation.name}</div>
<Button secondary wide on:click={testAutomation}>Test Automation</Button> <Button type="secondary" on:click={testAutomation}>Test Automation</Button>
{/if} {/if}
<Button <Button
secondary secondary

View File

@ -1,5 +1,5 @@
<script> <script>
import { Popover, TextButton, Icon } from "@budibase/bbui" import { Popover, Button } from "@budibase/bbui"
import CalculatePopover from "../popovers/CalculatePopover.svelte" import CalculatePopover from "../popovers/CalculatePopover.svelte"
export let view = {} export let view = {}
@ -9,14 +9,11 @@
</script> </script>
<div bind:this={anchor}> <div bind:this={anchor}>
<TextButton <Button icon="Calculator" type="overBackground" size="S" quiet
text
small
on:click={dropdown.show} on:click={dropdown.show}
active={view.field && view.calculation}> active={view.field && view.calculation}>
<Icon name="calculate" />
Calculate Calculate
</TextButton> </Button>
</div> </div>
<Popover bind:this={dropdown} {anchor} align="left"> <Popover bind:this={dropdown} {anchor} align="left">
<CalculatePopover {view} onClosed={dropdown.hide} /> <CalculatePopover {view} onClosed={dropdown.hide} />

View File

@ -1,7 +1,6 @@
<script> <script>
import { import {
DropdownMenu, Button,
TextButton as Button,
Icon, Icon,
Modal, Modal,
ModalContent, ModalContent,
@ -9,15 +8,11 @@
import CreateEditColumn from "../modals/CreateEditColumn.svelte" import CreateEditColumn from "../modals/CreateEditColumn.svelte"
let modal let modal
let fieldName
</script> </script>
<div> <Button icon="AddCircle" type="overBackground" size="S" quiet on:click={modal.show}>
<Button text small on:click={modal.show}> Create New Column
<Icon name="addcolumn" /> </Button>
Create New Column
</Button>
</div>
<Modal bind:this={modal}> <Modal bind:this={modal}>
<ModalContent <ModalContent
showCancelButton={false} showCancelButton={false}

View File

@ -1,5 +1,5 @@
<script> <script>
import { TextButton as Button, Icon, Modal } from "@budibase/bbui" import { Button, Icon, Modal } from "@budibase/bbui"
import CreateEditRow from "../modals/CreateEditRow.svelte" import CreateEditRow from "../modals/CreateEditRow.svelte"
export let modalContentComponent = CreateEditRow export let modalContentComponent = CreateEditRow
@ -8,12 +8,9 @@
let modal let modal
</script> </script>
<div> <Button icon="Add" type="overBackground" size="S" quiet on:click={modal.show}>
<Button text small on:click={modal.show}> {title}
<Icon name="addrow" /> </Button>
{title}
</Button>
</div>
<Modal bind:this={modal}> <Modal bind:this={modal}>
<svelte:component this={modalContentComponent} /> <svelte:component this={modalContentComponent} />
</Modal> </Modal>

View File

@ -1,5 +1,5 @@
<script> <script>
import { Popover, TextButton, Icon } from "@budibase/bbui" import { Popover, Button } from "@budibase/bbui"
import CreateViewPopover from "../popovers/CreateViewPopover.svelte" import CreateViewPopover from "../popovers/CreateViewPopover.svelte"
let anchor let anchor
@ -7,10 +7,9 @@
</script> </script>
<div bind:this={anchor}> <div bind:this={anchor}>
<TextButton text small on:click={dropdown.show}> <Button icon="CollectionAdd" type="overBackground" size="S" quiet on:click={dropdown.show}>
<Icon name="view" />
Create New View Create New View
</TextButton> </Button>
</div> </div>
<Popover bind:this={dropdown} {anchor} align="left"> <Popover bind:this={dropdown} {anchor} align="left">
<CreateViewPopover onClosed={dropdown.hide} /> <CreateViewPopover onClosed={dropdown.hide} />

View File

@ -1,5 +1,5 @@
<script> <script>
import { TextButton, Icon } from "@budibase/bbui" import { Button, Icon } from "@budibase/bbui"
import ConfirmDialog from "components/common/ConfirmDialog.svelte" import ConfirmDialog from "components/common/ConfirmDialog.svelte"
export let selectedRows export let selectedRows
@ -13,14 +13,11 @@
} }
</script> </script>
<div> <Button icon="Delete" size="s" type="overBackground" quiet on:click={modal.show}>
<TextButton small text on:click={modal.show}> Delete
<Icon name="delete" /> {selectedRows.length}
Delete row(s)
{selectedRows.length} </Button>
row(s)
</TextButton>
</div>
<ConfirmDialog <ConfirmDialog
bind:this={modal} bind:this={modal}
okText="Delete" okText="Delete"

View File

@ -1,23 +1,15 @@
<script> <script>
import { TextButton as Button, Modal } from "@budibase/bbui" import { Button, Modal } from "@budibase/bbui"
import EditRolesModal from "../modals/EditRoles.svelte" import EditRolesModal from "../modals/EditRoles.svelte"
let modal let modal
</script> </script>
<div> <div>
<Button text small on:click={modal.show}> <Button icon="UsersLock" type="overBackground" size="S" quiet on:click={modal.show}>
<i class="ri-lock-line" />
Edit Roles Edit Roles
</Button> </Button>
</div> </div>
<Modal bind:this={modal}> <Modal bind:this={modal}>
<EditRolesModal /> <EditRolesModal />
</Modal> </Modal>
<style>
i {
margin-right: var(--spacing-xs);
font-size: var(--font-size-s);
}
</style>

View File

@ -1,6 +1,5 @@
<script> <script>
import { TextButton, Icon, Popover } from "@budibase/bbui" import { Button, Icon, Popover } from "@budibase/bbui"
import api from "builderStore/api"
import ExportPopover from "../popovers/ExportPopover.svelte" import ExportPopover from "../popovers/ExportPopover.svelte"
export let view export let view
@ -10,10 +9,9 @@
</script> </script>
<div bind:this={anchor}> <div bind:this={anchor}>
<TextButton text small on:click={dropdown.show}> <Button icon="Download" type="overBackground" size="S" quiet on:click={dropdown.show}>
<Icon name="download" />
Export Export
</TextButton> </Button>
</div> </div>
<Popover bind:this={dropdown} {anchor} align="left"> <Popover bind:this={dropdown} {anchor} align="left">
<ExportPopover {view} onClosed={dropdown.hide} /> <ExportPopover {view} onClosed={dropdown.hide} />

View File

@ -1,5 +1,5 @@
<script> <script>
import { Popover, TextButton, Icon } from "@budibase/bbui" import { Popover, Button, Icon } from "@budibase/bbui"
import FilterPopover from "../popovers/FilterPopover.svelte" import FilterPopover from "../popovers/FilterPopover.svelte"
export let view = {} export let view = {}
@ -9,14 +9,11 @@
</script> </script>
<div bind:this={anchor}> <div bind:this={anchor}>
<TextButton <Button icon="Filter" type="overBackground" size="S" quiet
text
small
on:click={dropdown.show} on:click={dropdown.show}
active={view.filters && view.filters.length}> active={view.filters && view.filters.length}>
<Icon name="filter" />
Filter Filter
</TextButton> </Button>
</div> </div>
<Popover bind:this={dropdown} {anchor} align="left"> <Popover bind:this={dropdown} {anchor} align="left">
<FilterPopover {view} onClosed={dropdown.hide} /> <FilterPopover {view} onClosed={dropdown.hide} />

View File

@ -9,8 +9,7 @@
</script> </script>
<div bind:this={anchor}> <div bind:this={anchor}>
<TextButton text small active={!!view.groupBy} on:click={dropdown.show}> <TextButton icon="Group" type="overBackground" size="S" quiet active={!!view.groupBy} on:click={dropdown.show}>
<Icon name="group" />
Group By Group By
</TextButton> </TextButton>
</div> </div>

View File

@ -1,5 +1,5 @@
<script> <script>
import { TextButton } from "@budibase/bbui" import { Button } from "@budibase/bbui"
export let hideAutocolumns export let hideAutocolumns
@ -12,12 +12,13 @@
</script> </script>
<div bind:this={anchor}> <div bind:this={anchor}>
<TextButton text small on:click={hideOrUnhide}> <Button icon="MagicWand" type="overBackground" size="S" quiet on:click={hideOrUnhide}>
{#if hideAutocolumns} {#if hideAutocolumns}
<i class="ri-magic-line" />
Show Auto Columns Show Auto Columns
{:else}<i class="ri-magic-fill" /> Hide Auto Columns{/if} {:else}
</TextButton> Hide Auto Columns
{/if}
</Button>
</div> </div>
<style> <style>

View File

@ -1,5 +1,5 @@
<script> <script>
import { TextButton, Popover } from "@budibase/bbui" import { Button, Popover } from "@budibase/bbui"
import { permissions } from "stores/backend" import { permissions } from "stores/backend"
import ManageAccessPopover from "../popovers/ManageAccessPopover.svelte" import ManageAccessPopover from "../popovers/ManageAccessPopover.svelte"
@ -16,10 +16,9 @@
</script> </script>
<div bind:this={anchor}> <div bind:this={anchor}>
<TextButton text small on:click={openDropdown}> <Button icon="LockClosed" type="overBackground" size="S" quiet on:click={openDropdown}>
<i class="ri-lock-line" />
Manage Access Manage Access
</TextButton> </Button>
</div> </div>
<Popover bind:this={dropdown} {anchor} align="left"> <Popover bind:this={dropdown} {anchor} align="left">
<ManageAccessPopover <ManageAccessPopover
@ -27,11 +26,4 @@
levels={$permissions} levels={$permissions}
permissions={resourcePermissions} permissions={resourcePermissions}
onClosed={dropdown.hide} /> onClosed={dropdown.hide} />
</Popover> </Popover>
<style>
i {
margin-right: var(--spacing-xs);
font-size: var(--font-size-s);
}
</style>

View File

@ -291,8 +291,8 @@
{#if !uneditable && originalName != null} {#if !uneditable && originalName != null}
<TextButton text on:click={confirmDelete}>Delete Column</TextButton> <TextButton text on:click={confirmDelete}>Delete Column</TextButton>
{/if} {/if}
<Button secondary on:click={onClosed}>Cancel</Button> <Button on:click={onClosed}>Cancel</Button>
<Button primary on:click={saveColumn} bind:disabled={invalid}> <Button type="cta" on:click={saveColumn} bind:disabled={invalid}>
Save Column Save Column
</Button> </Button>
</footer> </footer>
@ -319,7 +319,6 @@
.actions { .actions {
display: grid; display: grid;
grid-gap: var(--spacing-xl); grid-gap: var(--spacing-xl);
min-width: 400px;
} }
footer { footer {

View File

@ -56,7 +56,7 @@
.integration-list { .integration-list {
display: grid; display: grid;
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat( auto-fit, minmax(150px, 1fr));
grid-gap: var(--spacing-m); grid-gap: var(--spacing-m);
} }
@ -68,7 +68,6 @@
transition: 0.3s all; transition: 0.3s all;
border-radius: var(--border-radius-s); border-radius: var(--border-radius-s);
height: 75px; height: 75px;
width: 200px;
} }
span { span {

View File

@ -41,6 +41,7 @@
<ModalContent <ModalContent
title="Create Datasource" title="Create Datasource"
size="large"
confirmText="Create" confirmText="Create"
onConfirm={saveDatasource} onConfirm={saveDatasource}
disabled={error || !name}> disabled={error || !name}>

View File

@ -76,7 +76,6 @@
<AppList /> <AppList />
</div> </div>
<div id="modal-container" />
<Modal bind:this={modal} padding={false} width="600px" on:hide={closeModal}> <Modal bind:this={modal} padding={false} width="600px" on:hide={closeModal}>
<CreateAppModal {hasKey} {template} /> <CreateAppModal {hasKey} {template} />
@ -122,8 +121,4 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} }
#modal-container {
position: absolute;
}
</style> </style>