Improve route safety
This commit is contained in:
parent
38e8ff879a
commit
f1121a11a3
|
@ -42,13 +42,11 @@
|
|||
onDestroy(stopSyncing)
|
||||
</script>
|
||||
|
||||
{#if $selectedScreen}
|
||||
{#if routeComponentId === "screen"}
|
||||
<ScreenSettingsPanel />
|
||||
{:else if routeComponentId === "navigation"}
|
||||
<NavigationPanel />
|
||||
{:else}
|
||||
<ComponentSettingsPanel />
|
||||
{/if}
|
||||
{#if routeComponentId === "screen"}
|
||||
<ScreenSettingsPanel />
|
||||
{:else if routeComponentId === "navigation"}
|
||||
<NavigationPanel />
|
||||
{:else}
|
||||
<ComponentSettingsPanel />
|
||||
{/if}
|
||||
<slot />
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
<script>
|
||||
import ScreenList from "./ScreenList/index.svelte"
|
||||
import ComponentList from "./ComponentList/index.svelte"
|
||||
import { selectedScreen } from "builderStore"
|
||||
</script>
|
||||
|
||||
<div class="panel">
|
||||
<ScreenList />
|
||||
{#if $selectedScreen}
|
||||
<ComponentList />
|
||||
{/if}
|
||||
<ComponentList />
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import AppPanel from "./_components/AppPanel.svelte"
|
||||
import * as routify from "@roxi/routify"
|
||||
import { syncURLToState } from "helpers/urlStateSync"
|
||||
import { store } from "builderStore"
|
||||
import { store, selectedScreen } from "builderStore"
|
||||
import { onDestroy } from "svelte"
|
||||
import LeftPanel from "./_components/LeftPanel.svelte"
|
||||
|
||||
|
@ -22,13 +22,15 @@
|
|||
onDestroy(stopSyncing)
|
||||
</script>
|
||||
|
||||
<div class="design">
|
||||
<div class="content">
|
||||
<LeftPanel />
|
||||
<AppPanel />
|
||||
<slot />
|
||||
{#if $selectedScreen}
|
||||
<div class="design">
|
||||
<div class="content">
|
||||
<LeftPanel />
|
||||
<AppPanel />
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
.design {
|
||||
|
|
Loading…
Reference in New Issue