diff --git a/packages/builder/src/components/backend/DataTable/buttons/grid/GridAutomationsButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/grid/GridAutomationsButton.svelte index 39d894d2fd..9670bb2f35 100644 --- a/packages/builder/src/components/backend/DataTable/buttons/grid/GridAutomationsButton.svelte +++ b/packages/builder/src/components/backend/DataTable/buttons/grid/GridAutomationsButton.svelte @@ -38,7 +38,7 @@ } - + - import { getContext } from "svelte" - import { Modal, ActionButton, TooltipType, TempTooltip } from "@budibase/bbui" - import GridCreateViewModal from "../../modals/grid/GridCreateViewModal.svelte" - - const { filter } = getContext("grid") - - let modal - let firstFilterUsage = false - - $: { - if ($filter?.length && !firstFilterUsage) { - firstFilterUsage = true - } - } - - - - - Create view - - - - - diff --git a/packages/builder/src/components/backend/DataTable/buttons/grid/GridGenerateButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/grid/GridGenerateButton.svelte index 84ef6102ca..cb2afbc000 100644 --- a/packages/builder/src/components/backend/DataTable/buttons/grid/GridGenerateButton.svelte +++ b/packages/builder/src/components/backend/DataTable/buttons/grid/GridGenerateButton.svelte @@ -89,7 +89,7 @@ } - +
diff --git a/packages/builder/src/components/backend/DataTable/buttons/grid/GridRowActionsButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/grid/GridRowActionsButton.svelte index 7b52c72fc7..a6a7c930f5 100644 --- a/packages/builder/src/components/backend/DataTable/buttons/grid/GridRowActionsButton.svelte +++ b/packages/builder/src/components/backend/DataTable/buttons/grid/GridRowActionsButton.svelte @@ -60,7 +60,7 @@ } - + - +
diff --git a/packages/builder/src/pages/builder/app/[application]/data/table/[tableId]/_components/CreateViewButton.svelte b/packages/builder/src/pages/builder/app/[application]/data/table/[tableId]/_components/CreateViewButton.svelte new file mode 100644 index 0000000000..78f1b7edee --- /dev/null +++ b/packages/builder/src/pages/builder/app/[application]/data/table/[tableId]/_components/CreateViewButton.svelte @@ -0,0 +1,103 @@ + + + (name = null)} +> + + {#if firstView} + + {:else} +
+ +
+ {/if} +
+ +
+ +
+
+ + diff --git a/packages/builder/src/pages/builder/app/[application]/data/table/[tableId]/_components/CreateViewModal.svelte b/packages/builder/src/pages/builder/app/[application]/data/table/[tableId]/_components/CreateViewModal.svelte index a37b5ccf82..49f5fcd1ff 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/table/[tableId]/_components/CreateViewModal.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/table/[tableId]/_components/CreateViewModal.svelte @@ -1,64 +1,2 @@ - - - - - - diff --git a/packages/builder/src/pages/builder/app/[application]/data/table/[tableId]/_components/EditViewModal.svelte b/packages/builder/src/pages/builder/app/[application]/data/table/[tableId]/_components/EditViewModal.svelte index 0809d55884..0f39fa063d 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/table/[tableId]/_components/EditViewModal.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/table/[tableId]/_components/EditViewModal.svelte @@ -39,7 +39,7 @@ - - + + diff --git a/packages/builder/src/pages/builder/app/[application]/data/table/[tableId]/_components/ViewNavBar.svelte b/packages/builder/src/pages/builder/app/[application]/data/table/[tableId]/_components/ViewNavBar.svelte index b1fffebbfe..4d48dd6a9b 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/table/[tableId]/_components/ViewNavBar.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/table/[tableId]/_components/ViewNavBar.svelte @@ -26,6 +26,7 @@ import CreateViewModal from "./CreateViewModal.svelte" import { onDestroy } from "svelte" import { derived } from "svelte/store" + import CreateViewButton from "./CreateViewButton.svelte" // View overflow let observer @@ -34,7 +35,6 @@ let overflowMenu // Editing table - let createViewModal let editTableModal let deleteTableModal @@ -268,7 +268,7 @@
{/if} {#if !hasViews && tableEditable} - + To create subsets of data, control access and more, create a view. @@ -311,19 +311,11 @@ {/if} {#if hasViews} - + {/if}
{#if table && tableEditable} - {/if} @@ -343,7 +335,7 @@ justify-content: flex-start; align-items: center; padding: 0 var(--spacing-xl); - gap: 12px; + gap: 8px; } .nav__views { flex: 0 1 auto; @@ -353,7 +345,6 @@ align-items: center; overflow: hidden; gap: 8px; - margin-left: -4px; } /* Table and view items */