From 88e6da5e49732aca5d81f4fbe41a37991ae60002 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 8 Dec 2020 10:14:02 +0000 Subject: [PATCH 1/3] Remove client bundle from being packaged with the builder --- packages/builder/rollup.config.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/builder/rollup.config.js b/packages/builder/rollup.config.js index ca63dcef74..2d5ec52f52 100644 --- a/packages/builder/rollup.config.js +++ b/packages/builder/rollup.config.js @@ -76,10 +76,6 @@ export default { { src: "src/index.html", dest: outputpath }, { src: "src/favicon.png", dest: outputpath }, { src: "assets", dest: outputpath }, - { - src: "node_modules/@budibase/client/dist/budibase-client.esm.mjs", - dest: outputpath, - }, { src: "node_modules/@budibase/bbui/dist/bbui.css", dest: outputpath, From 5130bdf3cd85c17a815d74661fda5ed79f9b5ba5 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 8 Dec 2020 10:15:33 +0000 Subject: [PATCH 2/3] Improve handling of routes and screens. Fix issue which could prevent logging in depending on order of screens in app definition --- packages/client/package.json | 2 +- packages/client/src/store/routes.js | 2 +- packages/client/src/store/screens.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/client/package.json b/packages/client/package.json index 685f500f59..2670d029c5 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -3,7 +3,7 @@ "version": "0.3.8", "license": "MPL-2.0", "main": "dist/budibase-client.js", - "module": "dist/budibase-client.esm.mjs", + "module": "dist/budibase-client.js", "scripts": { "build": "rollup -c", "dev:builder": "rollup -cw" diff --git a/packages/client/src/store/routes.js b/packages/client/src/store/routes.js index 4443844b39..c69bb83ef0 100644 --- a/packages/client/src/store/routes.js +++ b/packages/client/src/store/routes.js @@ -34,7 +34,7 @@ const createRouteStore = () => { } const setActiveRoute = route => { store.update(state => { - state.activeRoute = route + state.activeRoute = state.routes.find(x => x.path === route) return state }) } diff --git a/packages/client/src/store/screens.js b/packages/client/src/store/screens.js index 31923f198d..54c7dda109 100644 --- a/packages/client/src/store/screens.js +++ b/packages/client/src/store/screens.js @@ -24,9 +24,9 @@ const createScreenStore = () => { activeLayout = layouts[0] if (screens.length === 1) { activeScreen = screens[0] - } else { + } else if ($routeStore.activeRoute) { activeScreen = screens.find( - screen => screen.routing.route === $routeStore.activeRoute + screen => screen._id === $routeStore.activeRoute.screenId ) } if (activeScreen) { From fd207af6adea9e930bab13f6c21f5c47ec2d9cbd Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 8 Dec 2020 10:16:01 +0000 Subject: [PATCH 3/3] Tidy up builder preview iframe --- .../AppPreview/CurrentItemPreview.svelte | 12 +++++------- .../userInterface/AppPreview/iframeTemplate.html | 7 ++----- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/packages/builder/src/components/userInterface/AppPreview/CurrentItemPreview.svelte b/packages/builder/src/components/userInterface/AppPreview/CurrentItemPreview.svelte index 0d470e069a..ccb0153e45 100644 --- a/packages/builder/src/components/userInterface/AppPreview/CurrentItemPreview.svelte +++ b/packages/builder/src/components/userInterface/AppPreview/CurrentItemPreview.svelte @@ -69,13 +69,11 @@
- {#if $currentAsset} -