From 83924f0efa0d42e2b6df3ade81947d57c7896383 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 19 Nov 2020 16:12:55 +0000 Subject: [PATCH] remove old files --- .../ComponentNavigationTree/PathTree.svelte | 43 ++-- .../ScreenDropdownMenu.svelte | 7 +- .../ComponentNavigationTree/index.svelte | 2 +- .../userInterface/ComponentsHierarchy.svelte | 61 ------ .../ComponentsHierarchyChildren.svelte | 185 ------------------ .../design/[page]/[screen]/_layout.svelte | 4 +- 6 files changed, 28 insertions(+), 274 deletions(-) delete mode 100644 packages/builder/src/components/userInterface/ComponentsHierarchy.svelte delete mode 100644 packages/builder/src/components/userInterface/ComponentsHierarchyChildren.svelte diff --git a/packages/builder/src/components/userInterface/ComponentNavigationTree/PathTree.svelte b/packages/builder/src/components/userInterface/ComponentNavigationTree/PathTree.svelte index fd62eeee58..9283c7ec7a 100644 --- a/packages/builder/src/components/userInterface/ComponentNavigationTree/PathTree.svelte +++ b/packages/builder/src/components/userInterface/ComponentNavigationTree/PathTree.svelte @@ -11,10 +11,9 @@ const dragDropStore = instantiateStore() export let route + export let path export let indent - $: console.log(route) - $: console.log("preview", $store.currentPreviewItem) $: selectedScreen = $store.currentPreviewItem const changeScreen = screenId => { @@ -26,28 +25,28 @@ console.log(route)} /> -{#each Object.keys(route.screens) as screen} - changeScreen(route.screens[screen])}> - - - {#if selectedScreen?._id === route.screens[screen]} - - {/if} -{/each} {#each Object.keys(route.subpaths) as subpath} - + {#each Object.keys(route.subpaths[subpath].screens) as screen} + changeScreen(route.subpaths[subpath].screens[screen])}> + + + {#if selectedScreen?._id === route.subpaths[subpath].screens[screen]} + + {/if} + {/each} {/each} diff --git a/packages/builder/src/components/userInterface/ComponentNavigationTree/ScreenDropdownMenu.svelte b/packages/builder/src/components/userInterface/ComponentNavigationTree/ScreenDropdownMenu.svelte index de3a625b74..bd7341be93 100644 --- a/packages/builder/src/components/userInterface/ComponentNavigationTree/ScreenDropdownMenu.svelte +++ b/packages/builder/src/components/userInterface/ComponentNavigationTree/ScreenDropdownMenu.svelte @@ -1,6 +1,6 @@ - -
- {#each sortedScreens as screen} - changeScreen(screen)}> - - - - {#if $store.currentPreviewItem.props._instanceName && $store.currentPreviewItem.props._instanceName === screen.props._instanceName && screen.props._children} - - {/if} - {/each} -
diff --git a/packages/builder/src/components/userInterface/ComponentsHierarchyChildren.svelte b/packages/builder/src/components/userInterface/ComponentsHierarchyChildren.svelte deleted file mode 100644 index 5e017ac349..0000000000 --- a/packages/builder/src/components/userInterface/ComponentsHierarchyChildren.svelte +++ /dev/null @@ -1,185 +0,0 @@ - - -
    - {#each components as component, index (component._id)} -
  • selectComponent(component)}> - {#if $dragDropStore && $dragDropStore.targetComponent === component && $dragDropStore.dropPosition === 'above'} -
    - {/if} - - - - - - {#if component._children} - - {/if} - - {#if $dragDropStore && $dragDropStore.targetComponent === component && ($dragDropStore.dropPosition === 'inside' || $dragDropStore.dropPosition === 'below')} -
    - {/if} -
  • - {/each} -
- - diff --git a/packages/builder/src/pages/[application]/design/[page]/[screen]/_layout.svelte b/packages/builder/src/pages/[application]/design/[page]/[screen]/_layout.svelte index d67f365135..99434b7cd5 100644 --- a/packages/builder/src/pages/[application]/design/[page]/[screen]/_layout.svelte +++ b/packages/builder/src/pages/[application]/design/[page]/[screen]/_layout.svelte @@ -25,8 +25,8 @@ // Get the correct screen children. const screenChildren = $store.pages[$params.page]._screens.find( screen => - screen.props._instanceName === $params.screen || - screen.props._instanceName === decodeURIComponent($params.screen) + screen._id === $params.screen || + screen._id === decodeURIComponent($params.screen) ).props._children findComponent(componentIds, screenChildren) }