Improve route safety
This commit is contained in:
parent
38e8ff879a
commit
f1121a11a3
|
@ -42,13 +42,11 @@
|
||||||
onDestroy(stopSyncing)
|
onDestroy(stopSyncing)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if $selectedScreen}
|
{#if routeComponentId === "screen"}
|
||||||
{#if routeComponentId === "screen"}
|
<ScreenSettingsPanel />
|
||||||
<ScreenSettingsPanel />
|
{:else if routeComponentId === "navigation"}
|
||||||
{:else if routeComponentId === "navigation"}
|
<NavigationPanel />
|
||||||
<NavigationPanel />
|
{: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,13 +22,15 @@
|
||||||
onDestroy(stopSyncing)
|
onDestroy(stopSyncing)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="design">
|
{#if $selectedScreen}
|
||||||
<div class="content">
|
<div class="design">
|
||||||
<LeftPanel />
|
<div class="content">
|
||||||
<AppPanel />
|
<LeftPanel />
|
||||||
<slot />
|
<AppPanel />
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{/if}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.design {
|
.design {
|
||||||
|
|
Loading…
Reference in New Issue