From d8d01e56d5330ac929526ca38560062c1f07dd5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keviin=20=C3=85berg=20Kultalahti?= Date: Mon, 26 Apr 2021 12:11:51 +0200 Subject: [PATCH] Converts datasources dropdowns to use ActionMenu --- .../popovers/EditDatasourcePopover.svelte | 23 +++++-------------- .../popovers/EditQueryPopover.svelte | 23 ++++++------------- 2 files changed, 13 insertions(+), 33 deletions(-) diff --git a/packages/builder/src/components/backend/DatasourceNavigator/popovers/EditDatasourcePopover.svelte b/packages/builder/src/components/backend/DatasourceNavigator/popovers/EditDatasourcePopover.svelte index c0cd195431..fa19eb1d01 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/popovers/EditDatasourcePopover.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/popovers/EditDatasourcePopover.svelte @@ -2,13 +2,12 @@ import { goto } from "@roxi/routify" import { datasources } from "stores/backend" import { notifications } from "@budibase/bbui" - import { Icon, Popover } from "@budibase/bbui" + import { ActionMenu, MenuItem, Icon, Popover } from "@budibase/bbui" import ConfirmDialog from "components/common/ConfirmDialog.svelte" import { DropdownContainer, DropdownItem } from "components/common/Dropdowns" export let datasource - let anchor let dropdown let confirmDeleteDialog @@ -23,8 +22,6 @@ async function deleteDatasource() { const wasSelectedSource = $datasources.selected - console.log(wasSelectedSource) - console.log(datasource) await datasources.delete(datasource) notifications.success("Datasource deleted") // navigate to first index page if the source you are deleting is selected @@ -35,21 +32,13 @@ } -
-
+ +
- - - - - -
+ Delete + + import { notifications } from "@budibase/bbui" - import { Icon, Popover } from "@budibase/bbui" + import { ActionMenu, MenuItem, Icon, Popover } from "@budibase/bbui" import ConfirmDialog from "components/common/ConfirmDialog.svelte" import { DropdownContainer, DropdownItem } from "components/common/Dropdowns" export let query - - let anchor + let dropdown let confirmDeleteDialog @@ -26,21 +25,13 @@ } -
-
+ +
- - - - - -
+ Delete + +