From b53a96bb03b286add6d58b003e77054c9e566e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keviin=20=C3=85berg=20Kultalahti?= Date: Fri, 23 Apr 2021 12:39:48 +0200 Subject: [PATCH] remix replacement --- .../ComponentDropdownMenu.svelte | 40 ++++++++++++------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/packages/builder/src/components/design/NavigationPanel/ComponentDropdownMenu.svelte b/packages/builder/src/components/design/NavigationPanel/ComponentDropdownMenu.svelte index db0f047fbd..475ec1a54d 100644 --- a/packages/builder/src/components/design/NavigationPanel/ComponentDropdownMenu.svelte +++ b/packages/builder/src/components/design/NavigationPanel/ComponentDropdownMenu.svelte @@ -3,7 +3,7 @@ import { store, currentAsset } from "builderStore" import ConfirmDialog from "components/common/ConfirmDialog.svelte" import { findComponentParent } from "builderStore/storeUtils" - import { Popover } from "@budibase/bbui" + import { Icon, Popover } from "@budibase/bbui" import { DropdownContainer, DropdownItem } from "components/common/Dropdowns" export let component @@ -30,7 +30,7 @@ if (currentIndex === 0) { return } - const newChildren = parent._children.filter(c => c !== component) + const newChildren = parent._children.filter((c) => c !== component) newChildren.splice(currentIndex - 1, 0, component) parent._children = newChildren store.actions.preview.saveSelected() @@ -46,7 +46,7 @@ if (currentIndex === parent._children.length - 1) { return } - const newChildren = parent._children.filter(c => c !== component) + const newChildren = parent._children.filter((c) => c !== component) newChildren.splice(currentIndex + 1, 0, component) parent._children = newChildren store.actions.preview.saveSelected() @@ -66,56 +66,65 @@ store.actions.components.copy(component, cut) } - const pasteComponent = mode => { + const pasteComponent = (mode) => { // lives in store - also used by drag drop store.actions.components.paste(component, mode) }
-
+
confirmDeleteDialog.show()} /> + on:click={() => confirmDeleteDialog.show()} + /> + on:click={moveUpComponent} + /> + on:click={moveDownComponent} + /> + on:click={duplicateComponent} + /> storeComponentForCopy(true)} /> + on:click={() => storeComponentForCopy(true)} + /> storeComponentForCopy(false)} /> + on:click={() => storeComponentForCopy(false)} + />
pasteComponent('above')} /> + on:click={() => pasteComponent("above")} + /> pasteComponent('below')} /> + on:click={() => pasteComponent("below")} + /> pasteComponent('inside')} /> + on:click={() => pasteComponent("inside")} + />
@@ -124,7 +133,8 @@ title="Confirm Deletion" body={`Are you sure you wish to delete this '${definition?.name}' component?`} okText="Delete Component" - onOk={deleteComponent} /> + onOk={deleteComponent} +/>