Improve route safety
This commit is contained in:
parent
38e8ff879a
commit
f1121a11a3
3 changed files with 16 additions and 19 deletions
|
@ -42,7 +42,6 @@
|
||||||
onDestroy(stopSyncing)
|
onDestroy(stopSyncing)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if $selectedScreen}
|
|
||||||
{#if routeComponentId === "screen"}
|
{#if routeComponentId === "screen"}
|
||||||
<ScreenSettingsPanel />
|
<ScreenSettingsPanel />
|
||||||
{:else if routeComponentId === "navigation"}
|
{:else if routeComponentId === "navigation"}
|
||||||
|
@ -50,5 +49,4 @@
|
||||||
{:else}
|
{:else}
|
||||||
<ComponentSettingsPanel />
|
<ComponentSettingsPanel />
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
|
||||||
<slot />
|
<slot />
|
||||||
|
|
|
@ -1,14 +1,11 @@
|
||||||
<script>
|
<script>
|
||||||
import ScreenList from "./ScreenList/index.svelte"
|
import ScreenList from "./ScreenList/index.svelte"
|
||||||
import ComponentList from "./ComponentList/index.svelte"
|
import ComponentList from "./ComponentList/index.svelte"
|
||||||
import { selectedScreen } from "builderStore"
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<ScreenList />
|
<ScreenList />
|
||||||
{#if $selectedScreen}
|
|
||||||
<ComponentList />
|
<ComponentList />
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import AppPanel from "./_components/AppPanel.svelte"
|
import AppPanel from "./_components/AppPanel.svelte"
|
||||||
import * as routify from "@roxi/routify"
|
import * as routify from "@roxi/routify"
|
||||||
import { syncURLToState } from "helpers/urlStateSync"
|
import { syncURLToState } from "helpers/urlStateSync"
|
||||||
import { store } from "builderStore"
|
import { store, selectedScreen } from "builderStore"
|
||||||
import { onDestroy } from "svelte"
|
import { onDestroy } from "svelte"
|
||||||
import LeftPanel from "./_components/LeftPanel.svelte"
|
import LeftPanel from "./_components/LeftPanel.svelte"
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@
|
||||||
onDestroy(stopSyncing)
|
onDestroy(stopSyncing)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
{#if $selectedScreen}
|
||||||
<div class="design">
|
<div class="design">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<LeftPanel />
|
<LeftPanel />
|
||||||
|
@ -29,6 +30,7 @@
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.design {
|
.design {
|
||||||
|
|
Loading…
Reference in a new issue