From ae8c5cb8b1251f5a8a7d1a32961592a45e9bf061 Mon Sep 17 00:00:00 2001 From: kevmodrome Date: Tue, 28 Apr 2020 10:39:54 +0200 Subject: [PATCH 01/13] adds fallback page to catch params --- .../pages/[application]/frontend/[page]/_fallback.svelte | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 packages/builder/src/pages/[application]/frontend/[page]/_fallback.svelte diff --git a/packages/builder/src/pages/[application]/frontend/[page]/_fallback.svelte b/packages/builder/src/pages/[application]/frontend/[page]/_fallback.svelte new file mode 100644 index 0000000000..c2568469f0 --- /dev/null +++ b/packages/builder/src/pages/[application]/frontend/[page]/_fallback.svelte @@ -0,0 +1,7 @@ + + +TEST From d4c6e076ed6f92ffd8401c9508017f18c148d16f Mon Sep 17 00:00:00 2001 From: kevmodrome Date: Tue, 28 Apr 2020 12:04:38 +0200 Subject: [PATCH 02/13] sets up basic structure --- .../frontend/[page]/[screen]/_fallback.svelte | 9 +++++++++ .../pages/[application]/frontend/[page]/_fallback.svelte | 7 ------- .../pages/[application]/frontend/[page]/_layout.svelte | 7 +++++++ .../src/pages/[application]/frontend/[page]/index.svelte | 1 + 4 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 packages/builder/src/pages/[application]/frontend/[page]/[screen]/_fallback.svelte delete mode 100644 packages/builder/src/pages/[application]/frontend/[page]/_fallback.svelte create mode 100644 packages/builder/src/pages/[application]/frontend/[page]/_layout.svelte create mode 100644 packages/builder/src/pages/[application]/frontend/[page]/index.svelte diff --git a/packages/builder/src/pages/[application]/frontend/[page]/[screen]/_fallback.svelte b/packages/builder/src/pages/[application]/frontend/[page]/[screen]/_fallback.svelte new file mode 100644 index 0000000000..29240e41a0 --- /dev/null +++ b/packages/builder/src/pages/[application]/frontend/[page]/[screen]/_fallback.svelte @@ -0,0 +1,9 @@ + + +CREEN FALLBACK THINGIE! diff --git a/packages/builder/src/pages/[application]/frontend/[page]/_fallback.svelte b/packages/builder/src/pages/[application]/frontend/[page]/_fallback.svelte deleted file mode 100644 index c2568469f0..0000000000 --- a/packages/builder/src/pages/[application]/frontend/[page]/_fallback.svelte +++ /dev/null @@ -1,7 +0,0 @@ - - -TEST diff --git a/packages/builder/src/pages/[application]/frontend/[page]/_layout.svelte b/packages/builder/src/pages/[application]/frontend/[page]/_layout.svelte new file mode 100644 index 0000000000..bfcfa9be45 --- /dev/null +++ b/packages/builder/src/pages/[application]/frontend/[page]/_layout.svelte @@ -0,0 +1,7 @@ + + + diff --git a/packages/builder/src/pages/[application]/frontend/[page]/index.svelte b/packages/builder/src/pages/[application]/frontend/[page]/index.svelte new file mode 100644 index 0000000000..2a02d41ce2 --- /dev/null +++ b/packages/builder/src/pages/[application]/frontend/[page]/index.svelte @@ -0,0 +1 @@ +TEST From 4b4733daa8eb262947b7a3709cc50010cc399bf8 Mon Sep 17 00:00:00 2001 From: kevmodrome Date: Tue, 28 Apr 2020 13:59:29 +0200 Subject: [PATCH 03/13] moves frontend root to route component --- .../userInterface/UserInterfaceRoot.svelte | 240 ------------------ .../[application]/frontend/_layout.svelte | 240 +++++++++++++++++- .../pages/[application]/frontend/index.svelte | 5 - 3 files changed, 239 insertions(+), 246 deletions(-) delete mode 100644 packages/builder/src/components/userInterface/UserInterfaceRoot.svelte diff --git a/packages/builder/src/components/userInterface/UserInterfaceRoot.svelte b/packages/builder/src/components/userInterface/UserInterfaceRoot.svelte deleted file mode 100644 index 4f32c55d24..0000000000 --- a/packages/builder/src/components/userInterface/UserInterfaceRoot.svelte +++ /dev/null @@ -1,240 +0,0 @@ - - -
- -
- -
- - -
- - - -
- -
- - -
- -
- -
- -
- - {#if $store.currentFrontEndType === 'screen' || $store.currentFrontEndType === 'page'} -
- -
- {/if} - -
- - - - - store.deleteComponent(componentToDelete)} /> - - diff --git a/packages/builder/src/pages/[application]/frontend/_layout.svelte b/packages/builder/src/pages/[application]/frontend/_layout.svelte index bead97cca4..3cdc507521 100644 --- a/packages/builder/src/pages/[application]/frontend/_layout.svelte +++ b/packages/builder/src/pages/[application]/frontend/_layout.svelte @@ -2,6 +2,19 @@ import { store, backendUiStore } from "builderStore" import { goto } from "@sveltech/routify" import { onMount } from "svelte" + import ComponentsHierarchy from "components/userInterface/ComponentsHierarchy.svelte" + import ComponentsHierarchyChildren from "components/userInterface/ComponentsHierarchyChildren.svelte" + import PageLayout from "components/userInterface/PageLayout.svelte" + import PagesList from "components/userInterface/PagesList.svelte" + import IconButton from "components/common/IconButton.svelte" + import NewScreen from "components/userInterface/NewScreen.svelte" + import CurrentItemPreview from "components/userInterface/CurrentItemPreview.svelte" + import SettingsView from "components/userInterface/SettingsView.svelte" + import PageView from "components/userInterface/PageView.svelte" + import ComponentsPaneSwitcher from "components/userInterface/ComponentsPaneSwitcher.svelte" + import ConfirmDialog from "components/common/ConfirmDialog.svelte" + import { last } from "lodash/fp" + import { AddIcon } from "components/common/Icons" $: instances = $store.appInstances $: views = $store.hierarchy.indexes @@ -17,6 +30,231 @@ await selectDatabase($store.appInstances[0]) } }) + + let newScreenPicker + let confirmDeleteDialog + let componentToDelete = "" + + const newScreen = () => { + newScreenPicker.show() + } + + let settingsView + const settings = () => { + settingsView.show() + } + + const confirmDeleteComponent = component => { + componentToDelete = component + confirmDeleteDialog.show() + } + + const lastPartOfName = c => (c ? last(c.split("/")) : "") + + $: console.log("Pages: ", $store.pages[$store.currentPageName]) + $: console.log("Screens: ", $store.screens) - +
+ +
+ +
+ + +
+ + + +
+ +
+ + +
+ +
+ +
+ +
+ + {#if $store.currentFrontEndType === 'screen' || $store.currentFrontEndType === 'page'} +
+ +
+ {/if} + +
+ + + + + store.deleteComponent(componentToDelete)} /> + + diff --git a/packages/builder/src/pages/[application]/frontend/index.svelte b/packages/builder/src/pages/[application]/frontend/index.svelte index 89b0a83720..e69de29bb2 100644 --- a/packages/builder/src/pages/[application]/frontend/index.svelte +++ b/packages/builder/src/pages/[application]/frontend/index.svelte @@ -1,5 +0,0 @@ - - - From 56ca7dd2b85c88fc1b293f5d10fe2a25aefec690 Mon Sep 17 00:00:00 2001 From: kevmodrome Date: Tue, 28 Apr 2020 14:21:40 +0200 Subject: [PATCH 04/13] adds default navigation to main page --- .../builder/src/components/userInterface/PagesList.svelte | 3 ++- .../builder/src/pages/[application]/frontend/_layout.svelte | 2 ++ .../builder/src/pages/[application]/frontend/index.svelte | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/userInterface/PagesList.svelte b/packages/builder/src/components/userInterface/PagesList.svelte index 56b5fe7874..7b70e55183 100644 --- a/packages/builder/src/components/userInterface/PagesList.svelte +++ b/packages/builder/src/components/userInterface/PagesList.svelte @@ -1,4 +1,5 @@
diff --git a/packages/builder/src/pages/[application]/frontend/_layout.svelte b/packages/builder/src/pages/[application]/frontend/_layout.svelte index 3cdc507521..d33b42c3fc 100644 --- a/packages/builder/src/pages/[application]/frontend/_layout.svelte +++ b/packages/builder/src/pages/[application]/frontend/_layout.svelte @@ -118,6 +118,8 @@ okText="Delete Component" onOk={() => store.deleteComponent(componentToDelete)} /> + +