From f9736ec3bc74d60a952f0bf5040ac7d77b069dab Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Wed, 2 Dec 2020 15:19:38 +0000 Subject: [PATCH] component tree layout/screen agnostic --- .../ComponentNavigationTree/ComponentTree.svelte | 11 ++++++----- .../userInterface/ComponentSelectionList.svelte | 9 +++++++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/packages/builder/src/components/userInterface/ComponentNavigationTree/ComponentTree.svelte b/packages/builder/src/components/userInterface/ComponentNavigationTree/ComponentTree.svelte index a9771f9f95..ae7118a88b 100644 --- a/packages/builder/src/components/userInterface/ComponentNavigationTree/ComponentTree.svelte +++ b/packages/builder/src/components/userInterface/ComponentNavigationTree/ComponentTree.svelte @@ -24,11 +24,12 @@ const path = store.actions.components.findRoute(component) // Go to correct URL - if (layout) { - $goto(`./layouts/:layout/${path}`) - } else { - $goto(`./screens/:screen/${path}`) - } + $goto(`./${path}`) + // if (layout) { + // $goto(`./layouts/:layout/${path}`) + // } else { + // $goto(`./screens/:screen/${path}`) + // } } const dragstart = component => e => { diff --git a/packages/builder/src/components/userInterface/ComponentSelectionList.svelte b/packages/builder/src/components/userInterface/ComponentSelectionList.svelte index a6f1d6fea5..aa468b8870 100644 --- a/packages/builder/src/components/userInterface/ComponentSelectionList.svelte +++ b/packages/builder/src/components/userInterface/ComponentSelectionList.svelte @@ -28,6 +28,7 @@ store.actions.components.create(component._component, component.presetProps) const path = store.actions.components.findRoute($store.currentComponentInfo) $goto(`./:screen/${path}`) + // $goto(`./${path}`) close() } @@ -39,9 +40,13 @@ class="category" on:click={() => onCategoryChosen(category, idx)} class:active={idx === selectedIndex}> - {#if category.icon}{/if} + {#if category.icon} + + {/if} {category.name} - {#if category.isCategory}{/if} + {#if category.isCategory} + + {/if} {/each}