From 35aa2d341a90661dcc733d4e1eb10f8e812a3a31 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 9 Jun 2020 19:18:45 +0100 Subject: [PATCH] Revert "Fixes for Screen and Page Props" --- .../builder/src/builderStore/store/index.js | 12 ------ .../ComponentPropertiesPanel.svelte | 43 ++++++------------- .../userInterface/SettingsView.svelte | 5 +-- .../userInterface/propertyCategories.js | 14 ++---- 4 files changed, 18 insertions(+), 56 deletions(-) diff --git a/packages/builder/src/builderStore/store/index.js b/packages/builder/src/builderStore/store/index.js index ac66643612..9f91550bca 100644 --- a/packages/builder/src/builderStore/store/index.js +++ b/packages/builder/src/builderStore/store/index.js @@ -69,7 +69,6 @@ export const getStore = () => { store.getPathToComponent = getPathToComponent(store) store.addTemplatedComponent = addTemplatedComponent(store) store.setMetadataProp = setMetadataProp(store) - store.editPageOrScreen = editPageOrScreen(store) return store } @@ -172,15 +171,6 @@ const createScreen = store => (screenName, route, layoutComponentName) => { }) } -const editPageOrScreen = store => (key, value) => { - store.update(state => { - state.currentPreviewItem[key] = value - _saveCurrentPreviewItem(state) - - return state - }) -} - const setCurrentScreen = store => screenName => { store.update(s => { const screen = getExactComponent(s.screens, screenName) @@ -295,7 +285,6 @@ const setCurrentPage = store => pageName => { state.currentFrontEndType = "page" state.currentPageName = pageName - state.currentView = "detail" state.screens = Array.isArray(current_screens) ? current_screens : Object.values(current_screens) @@ -456,7 +445,6 @@ const setScreenType = store => type => { state.currentComponentInfo = pageOrScreen ? pageOrScreen.props : null state.currentPreviewItem = pageOrScreen - state.currentView = "detail" return state }) } diff --git a/packages/builder/src/components/userInterface/ComponentPropertiesPanel.svelte b/packages/builder/src/components/userInterface/ComponentPropertiesPanel.svelte index caef9eb2fd..60279aa9a1 100644 --- a/packages/builder/src/components/userInterface/ComponentPropertiesPanel.svelte +++ b/packages/builder/src/components/userInterface/ComponentPropertiesPanel.svelte @@ -1,6 +1,5 @@