From d24679bc332d886ecf375f136983d7db21946d6b Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 8 Oct 2020 09:35:11 +0100 Subject: [PATCH] Move modal to BBUI and update usages --- packages/builder/src/App.svelte | 2 - .../AutomationList/AutomationList.svelte | 15 +-- .../CreateAutomationModal.svelte | 10 +- .../DataTable/buttons/CreateRowButton.svelte | 13 +- .../modals/CreateEditRecordModal.svelte | 9 +- .../DataTable/popovers/RowPopover.svelte | 13 +- .../modals/CreateTableModal.svelte | 46 +++---- .../components/common/ConfirmDialog.svelte | 26 ++-- .../src/components/settings/Link.svelte | 12 +- .../components/settings/SettingsModal.svelte | 11 +- .../components/start/CreateAppModal.svelte | 117 ++++++++---------- .../EventsEditor/EventEditorModal.svelte | 14 +-- .../EventsEditor/EventPropertyControl.svelte | 18 +-- .../EventsEditor/EventsEditor.svelte | 9 +- .../userInterface/FrontendNavigatePane.svelte | 51 ++------ .../userInterface/NewScreenModal.svelte | 8 +- .../userInterface/UserInterfaceRoot.svelte | 26 ++-- packages/builder/src/pages/index.svelte | 21 ++-- 18 files changed, 156 insertions(+), 265 deletions(-) diff --git a/packages/builder/src/App.svelte b/packages/builder/src/App.svelte index 0badb1012b..a5016db114 100644 --- a/packages/builder/src/App.svelte +++ b/packages/builder/src/App.svelte @@ -4,7 +4,6 @@ import { routes } from "../routify/routes" import { initialise } from "builderStore" import NotificationDisplay from "components/common/Notification/NotificationDisplay.svelte" - import { ModalContainer } from "components/common/Modal" onMount(async () => { await initialise() @@ -15,4 +14,3 @@ - diff --git a/packages/builder/src/components/automation/AutomationPanel/AutomationList/AutomationList.svelte b/packages/builder/src/components/automation/AutomationPanel/AutomationList/AutomationList.svelte index 7b5b117a91..328c0d6122 100644 --- a/packages/builder/src/components/automation/AutomationPanel/AutomationList/AutomationList.svelte +++ b/packages/builder/src/components/automation/AutomationPanel/AutomationList/AutomationList.svelte @@ -2,10 +2,9 @@ import { onMount } from "svelte" import { automationStore } from "builderStore" import CreateAutomationModal from "./CreateAutomationModal.svelte" - import { Button } from "@budibase/bbui" - import { Modal } from "components/common/Modal" + import { Button, Modal } from "@budibase/bbui" - let modalVisible = false + let modal $: selectedAutomationId = $automationStore.selectedAutomation?.automation?._id @@ -15,9 +14,7 @@
- +
    {#each $automationStore.automations as automation}
-{#if modalVisible} - -{/if} + + + + + + diff --git a/packages/builder/src/components/userInterface/NewScreenModal.svelte b/packages/builder/src/components/userInterface/NewScreenModal.svelte index 109bb2965a..d38d4bbb7b 100644 --- a/packages/builder/src/components/userInterface/NewScreenModal.svelte +++ b/packages/builder/src/components/userInterface/NewScreenModal.svelte @@ -1,11 +1,7 @@
-
-
-
- -
-
-
- {#if $store.currentFrontEndType === 'screen' || $store.currentFrontEndType === 'page'}
{/if} -
-{#if modalVisible} - -{/if} + + + +