|
|
@ -1,4 +1,5 @@ |
|
|
<script> |
|
|
<script> |
|
|
|
|
|
import { goto } from "@sveltech/routify" |
|
|
// import { tick } from "svelte" |
|
|
// import { tick } from "svelte" |
|
|
import ComponentsHierarchyChildren from "./ComponentsHierarchyChildren.svelte" |
|
|
import ComponentsHierarchyChildren from "./ComponentsHierarchyChildren.svelte" |
|
|
|
|
|
|
|
|
@ -16,15 +17,12 @@ |
|
|
const joinPath = join("/") |
|
|
const joinPath = join("/") |
|
|
|
|
|
|
|
|
const normalizedName = name => |
|
|
const normalizedName = name => |
|
|
pipe( |
|
|
pipe(name, [ |
|
|
name, |
|
|
trimCharsStart("./"), |
|
|
[ |
|
|
trimCharsStart("~/"), |
|
|
trimCharsStart("./"), |
|
|
trimCharsStart("../"), |
|
|
trimCharsStart("~/"), |
|
|
trimChars(" "), |
|
|
trimCharsStart("../"), |
|
|
]) |
|
|
trimChars(" "), |
|
|
|
|
|
] |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
const lastPartOfName = c => |
|
|
const lastPartOfName = c => |
|
|
c && last(c.name ? c.name.split("/") : c._component.split("/")) |
|
|
c && last(c.name ? c.name.split("/") : c._component.split("/")) |
|
|
@ -33,10 +31,7 @@ |
|
|
|
|
|
|
|
|
const isFolderSelected = (current, folder) => isInSubfolder(current, folder) |
|
|
const isFolderSelected = (current, folder) => isInSubfolder(current, folder) |
|
|
|
|
|
|
|
|
$: _layout = pipe( |
|
|
$: _layout = pipe(layout, [c => ({ component: c, title: lastPartOfName(c) })]) |
|
|
layout, |
|
|
|
|
|
[c => ({ component: c, title: lastPartOfName(c) })] |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
const isScreenSelected = component => |
|
|
const isScreenSelected = component => |
|
|
component.component && |
|
|
component.component && |
|
|
@ -48,6 +43,11 @@ |
|
|
// await tick() |
|
|
// await tick() |
|
|
confirmDeleteDialog.show() |
|
|
confirmDeleteDialog.show() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const setCurrentScreenToLayout = () => { |
|
|
|
|
|
store.setScreenType("page") |
|
|
|
|
|
$goto("./:page/page-layout") |
|
|
|
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<div class="pagelayoutSection"> |
|
|
<div class="pagelayoutSection"> |
|
|
@ -55,7 +55,7 @@ |
|
|
<div |
|
|
<div |
|
|
class="budibase__nav-item root" |
|
|
class="budibase__nav-item root" |
|
|
class:selected={$store.currentComponentInfo._id === _layout.component.props._id} |
|
|
class:selected={$store.currentComponentInfo._id === _layout.component.props._id} |
|
|
on:click|stopPropagation={() => store.setScreenType('page')}> |
|
|
on:click|stopPropagation={setCurrentScreenToLayout}> |
|
|
<span |
|
|
<span |
|
|
class="icon" |
|
|
class="icon" |
|
|
class:rotate={$store.currentPreviewItem.name !== _layout.title}> |
|
|
class:rotate={$store.currentPreviewItem.name !== _layout.title}> |
|
|
@ -89,23 +89,21 @@ |
|
|
onOk={() => store.deleteComponent(componentToDelete)} /> |
|
|
onOk={() => store.deleteComponent(componentToDelete)} /> |
|
|
|
|
|
|
|
|
<style> |
|
|
<style> |
|
|
.components-nav-page { |
|
|
.components-nav-page { |
|
|
font-size: 13px; |
|
|
font-size: 13px; |
|
|
color: #000333; |
|
|
color: #000333; |
|
|
text-transform: uppercase; |
|
|
text-transform: uppercase; |
|
|
margin-bottom: 10px; |
|
|
margin-bottom: 10px; |
|
|
padding-left: 20px; |
|
|
padding-left: 20px; |
|
|
font-weight: 600; |
|
|
font-weight: 600; |
|
|
opacity: 0.4; |
|
|
opacity: 0.4; |
|
|
letter-spacing: 1px; |
|
|
letter-spacing: 1px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.pagelayoutSection { |
|
|
|
|
|
margin: 20px 0px 20px 0px; |
|
|
|
|
|
} |
|
|
|
|
|
.root { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.pagelayoutSection { |
|
|
|
|
|
margin: 20px 0px 20px 0px; |
|
|
|
|
|
} |
|
|
|
|
|
.root { |
|
|
} |
|
|
} |
|
|
.title { |
|
|
.title { |
|
|
margin-left: 10px; |
|
|
margin-left: 10px; |
|
|
|