diff --git a/packages/client/src/components/preview/SettingsBar.svelte b/packages/client/src/components/preview/SettingsBar.svelte index f72994e496..7f9b92c01d 100644 --- a/packages/client/src/components/preview/SettingsBar.svelte +++ b/packages/client/src/components/preview/SettingsBar.svelte @@ -24,6 +24,9 @@ } $: settings = getBarSettings(definition) + $: isScreen = + $builderStore.selectedComponentId === $builderStore.screen?.props?._id + const getBarSettings = definition => { let allSettings = [] definition?.settings?.forEach(setting => { @@ -152,26 +155,30 @@ {:else if setting.type === "color"} {/if} - {#if setting.barSeparator !== false} + {#if setting.barSeparator !== false && (settings.length != idx + 1 || !isScreen)}
{/if} {/each} - { - builderStore.actions.duplicateComponent( - $builderStore.selectedComponentId - ) - }} - title="Duplicate component" - /> - { - builderStore.actions.deleteComponent($builderStore.selectedComponentId) - }} - title="Delete component" - /> + {#if !isScreen} + { + builderStore.actions.duplicateComponent( + $builderStore.selectedComponentId + ) + }} + title="Duplicate component" + /> + { + builderStore.actions.deleteComponent( + $builderStore.selectedComponentId + ) + }} + title="Delete component" + /> + {/if}
{/if}