This commit is contained in:
Gerard Burns 2023-08-21 08:33:53 +01:00
parent 67d5eef293
commit d0f9694d24
4 changed files with 105 additions and 102 deletions

View File

@ -1000,10 +1000,10 @@ export const getFrontendStore = () => {
const parent = findComponentParent(screen.props, componentId) const parent = findComponentParent(screen.props, componentId)
const index = parent?._children.findIndex(x => x._id === componentId) const index = parent?._children.findIndex(x => x._id === componentId)
if (componentId === 'screen') { if (componentId === "screen") {
return null return null
} }
if (componentId === 'navigation') { if (componentId === "navigation") {
return "screen" return "screen"
} }
if (parent._id === screen.props._id && index === 0) { if (parent._id === screen.props._id && index === 0) {
@ -1037,8 +1037,8 @@ export const getFrontendStore = () => {
const parent = findComponentParent(screen.props, componentId) const parent = findComponentParent(screen.props, componentId)
const index = parent?._children.findIndex(x => x._id === componentId) const index = parent?._children.findIndex(x => x._id === componentId)
if (state.selectedComponentId === 'screen') { if (state.selectedComponentId === "screen") {
return 'navigation' return "navigation"
} }
// If we have children, select first child // If we have children, select first child

View File

@ -1,7 +1,12 @@
<script> <script>
import { get } from "svelte/store" import { get } from "svelte/store"
import { onMount, onDestroy } from "svelte" import { onMount, onDestroy } from "svelte"
import { store, selectedComponent, selectedScreen, currentAsset } from "builderStore" import {
store,
selectedComponent,
selectedScreen,
currentAsset,
} from "builderStore"
import ConfirmDialog from "components/common/ConfirmDialog.svelte" import ConfirmDialog from "components/common/ConfirmDialog.svelte"
import { import {
ProgressCircle, ProgressCircle,

View File

@ -1,5 +1,5 @@
<script> <script>
import LinksEditor from './LinksEditor.svelte' import LinksEditor from "./LinksEditor.svelte"
import { get } from "svelte/store" import { get } from "svelte/store"
import Panel from "components/design/Panel.svelte" import Panel from "components/design/Panel.svelte"
import { import {
@ -7,7 +7,6 @@
Toggle, Toggle,
Body, Body,
Icon, Icon,
Button,
ColorPicker, ColorPicker,
Input, Input,
Label, Label,
@ -58,8 +57,6 @@
</div> </div>
</div> </div>
{#if $selectedScreen.showNavigation} {#if $selectedScreen.showNavigation}
<div class="divider" /> <div class="divider" />
<div class="customizeSection"> <div class="customizeSection">
@ -151,7 +148,8 @@
</div> </div>
<ColorPicker <ColorPicker
spectrumTheme={$store.theme} spectrumTheme={$store.theme}
value={$store.navigation.navBackground || DefaultAppTheme.navBackground} value={$store.navigation.navBackground ||
DefaultAppTheme.navBackground}
on:change={e => update("navBackground", e.detail)} on:change={e => update("navBackground", e.detail)}
/> />
<div class="label"> <div class="label">