diff --git a/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte b/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte index 2df4f8feef..cdacd5b38f 100644 --- a/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte +++ b/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte @@ -1,4 +1,5 @@
@@ -57,7 +63,7 @@
store.setCurrentScreen(screen.title)}> + on:click|stopPropagation={() => changeScreen(screen)}> + import { goto } from "@sveltech/routify" // import { tick } from "svelte" import ComponentsHierarchyChildren from "./ComponentsHierarchyChildren.svelte" @@ -16,15 +17,12 @@ const joinPath = join("/") const normalizedName = name => - pipe( - name, - [ - trimCharsStart("./"), - trimCharsStart("~/"), - trimCharsStart("../"), - trimChars(" "), - ] - ) + pipe(name, [ + trimCharsStart("./"), + trimCharsStart("~/"), + trimCharsStart("../"), + trimChars(" "), + ]) const lastPartOfName = c => c && last(c.name ? c.name.split("/") : c._component.split("/")) @@ -33,10 +31,7 @@ const isFolderSelected = (current, folder) => isInSubfolder(current, folder) - $: _layout = pipe( - layout, - [c => ({ component: c, title: lastPartOfName(c) })] - ) + $: _layout = pipe(layout, [c => ({ component: c, title: lastPartOfName(c) })]) const isScreenSelected = component => component.component && @@ -48,6 +43,11 @@ // await tick() confirmDeleteDialog.show() } + + const setCurrentScreenToLayout = () => { + store.setScreenType("page") + $goto("./:page/page-layout") + }
@@ -55,7 +55,7 @@
store.setScreenType('page')}> + on:click|stopPropagation={setCurrentScreenToLayout}> @@ -89,23 +89,21 @@ onOk={() => store.deleteComponent(componentToDelete)} />