adds functionality to navigate to screens and layouts
This commit is contained in:
parent
eb1d2dc337
commit
3fba410cf8
|
@ -53,8 +53,6 @@
|
||||||
store.setCurrentScreen(screen.title)
|
store.setCurrentScreen(screen.title)
|
||||||
$goto(`./:page/${screen.title}`)
|
$goto(`./:page/${screen.title}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
$: console.log("Params: ", $params)
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="root">
|
<div class="root">
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
<script>
|
||||||
|
import { onMount } from "svelte"
|
||||||
|
import { params } from "@sveltech/routify"
|
||||||
|
import { store } from "builderStore"
|
||||||
|
|
||||||
|
if ($params.screen !== "page-layout") {
|
||||||
|
store.setCurrentScreen($params.screen)
|
||||||
|
} else {
|
||||||
|
store.setScreenType("page")
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<slot />
|
||||||
|
store.setScreenType("page")
|
|
@ -0,0 +1,8 @@
|
||||||
|
<script>
|
||||||
|
import { params } from "@sveltech/routify"
|
||||||
|
import { store } from "builderStore"
|
||||||
|
|
||||||
|
store.setCurrentPage($params.page)
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<slot />
|
|
@ -1 +0,0 @@
|
||||||
TEST
|
|
|
@ -50,9 +50,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const lastPartOfName = c => (c ? last(c.split("/")) : "")
|
const lastPartOfName = c => (c ? last(c.split("/")) : "")
|
||||||
|
|
||||||
$: console.log("Pages: ", $store.pages[$store.currentPageName])
|
|
||||||
$: console.log("Screens: ", $store.screens)
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="root">
|
<div class="root">
|
||||||
|
|
Loading…
Reference in New Issue