diff --git a/packages/bbui/src/StatusLight/StatusLight.svelte b/packages/bbui/src/StatusLight/StatusLight.svelte index f56fee0c2a..6bd1ead558 100644 --- a/packages/bbui/src/StatusLight/StatusLight.svelte +++ b/packages/bbui/src/StatusLight/StatusLight.svelte @@ -17,10 +17,13 @@ export let negative = false export let disabled = false export let active = false + export let color = null
+ + diff --git a/packages/builder/src/builderStore/store/frontend.js b/packages/builder/src/builderStore/store/frontend.js index dd844ef5ab..909bbcf9f8 100644 --- a/packages/builder/src/builderStore/store/frontend.js +++ b/packages/builder/src/builderStore/store/frontend.js @@ -15,7 +15,7 @@ import { tables, } from "stores/backend" import { API } from "api" -import { DesignTabs, FrontendTypes } from "constants" +import { FrontendTypes } from "constants" import analytics, { Events } from "analytics" import { findComponentType, @@ -48,8 +48,6 @@ const INITIAL_FRONTEND_STATE = { continueIfAction: false, }, currentFrontEndType: "none", - selectedDesignTab: DesignTabs.SCREENS, - selectedScreenId: "", selectedLayoutId: "", selectedComponentId: "", errors: [], @@ -61,6 +59,9 @@ const INITIAL_FRONTEND_STATE = { theme: "", customTheme: {}, previewDevice: "desktop", + + // URL params + selectedScreenId: null, } export const getFrontendStore = () => { diff --git a/packages/builder/src/components/common/NavItem.svelte b/packages/builder/src/components/common/NavItem.svelte index 364ae50f64..3aba4c7a1b 100644 --- a/packages/builder/src/components/common/NavItem.svelte +++ b/packages/builder/src/components/common/NavItem.svelte @@ -1,5 +1,5 @@ + +
+
+ + {#if $store.clientFeatures.devicePreview} + + {/if} + {#if $store.clientFeatures.customThemes} + + {:else if $store.clientFeatures.spectrumThemes} + + {/if} +
+
+ {#key $store.version} + + {/key} +
+
+ + diff --git a/packages/builder/src/components/design/AppPreview/CurrentItemPreview.svelte b/packages/builder/src/components/design/AppPanel/AppPreview.svelte similarity index 96% rename from packages/builder/src/components/design/AppPreview/CurrentItemPreview.svelte rename to packages/builder/src/components/design/AppPanel/AppPreview.svelte index 28bc50d15a..5eda3ce080 100644 --- a/packages/builder/src/components/design/AppPreview/CurrentItemPreview.svelte +++ b/packages/builder/src/components/design/AppPanel/AppPreview.svelte @@ -1,7 +1,7 @@ + + + + diff --git a/packages/builder/src/constants/index.js b/packages/builder/src/constants/index.js index 0316a77550..d4b7116c01 100644 --- a/packages/builder/src/constants/index.js +++ b/packages/builder/src/constants/index.js @@ -1,13 +1,14 @@ +import { Roles } from "./backend" + export const TableNames = { USERS: "ta_users", } -export const DesignTabs = { - SCREENS: "screens", - COMPONENTS: "components", - THEME: "theme", - NAVIGATION: "navigation", - LAYOUTS: "layouts", +export const RoleColours = { + [Roles.ADMIN]: "var(--spectrum-global-color-static-seafoam-400)", + [Roles.POWER]: "var(--spectrum-global-color-static-purple-400)", + [Roles.BASIC]: "var(--spectrum-global-color-static-magenta-400)", + [Roles.PUBLIC]: "var(--spectrum-global-color-static-yellow-400)", } export const FrontendTypes = { diff --git a/packages/builder/src/helpers/urlStateSync.js b/packages/builder/src/helpers/urlStateSync.js index 22ef98ded7..7b33caf042 100644 --- a/packages/builder/src/helpers/urlStateSync.js +++ b/packages/builder/src/helpers/urlStateSync.js @@ -55,7 +55,7 @@ export const syncURLToState = options => { // Updates the URL with new state values const mapStateToUrl = state => { // Determine new URL while checking for changes - let url = "." + let url = ".." let needsUpdate = false for (let key of keys) { const urlValue = cachedParams?.[key.url] diff --git a/packages/builder/src/pages/builder/app/[application]/design/_layout.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_layout.svelte similarity index 55% rename from packages/builder/src/pages/builder/app/[application]/design/_layout.svelte rename to packages/builder/src/pages/builder/app/[application]/design/[screenId]/_layout.svelte index 0ea4e8456d..5a93854033 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/_layout.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_layout.svelte @@ -1,23 +1,15 @@ diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/layouts/index.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/layouts/index.svelte new file mode 100644 index 0000000000..b0615c5c1f --- /dev/null +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/layouts/index.svelte @@ -0,0 +1 @@ +Layouts diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/navigation/index.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/navigation/index.svelte new file mode 100644 index 0000000000..06b36d1aae --- /dev/null +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/navigation/index.svelte @@ -0,0 +1 @@ +Navigation diff --git a/packages/builder/src/components/design/NavigationPanel/ScreenDetailsModal.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/_components/ScreenDetailsModal.svelte similarity index 100% rename from packages/builder/src/components/design/NavigationPanel/ScreenDetailsModal.svelte rename to packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/_components/ScreenDetailsModal.svelte diff --git a/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/ScreenDropdownMenu.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/_components/ScreenDropdownMenu.svelte similarity index 97% rename from packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/ScreenDropdownMenu.svelte rename to packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/_components/ScreenDropdownMenu.svelte index 76bb48a26c..b4b612d655 100644 --- a/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/ScreenDropdownMenu.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/_components/ScreenDropdownMenu.svelte @@ -10,7 +10,7 @@ Helpers, notifications, } from "@budibase/bbui" - import ScreenDetailsModal from "../ScreenDetailsModal.svelte" + import ScreenDetailsModal from "./ScreenDetailsModal.svelte" import sanitizeUrl from "builderStore/store/screenTemplates/utils/sanitizeUrl" import analytics, { Events } from "analytics" import { makeComponentUnique } from "builderStore/componentUtils" diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/_layout.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/_layout.svelte new file mode 100644 index 0000000000..4fa864ce7a --- /dev/null +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/_layout.svelte @@ -0,0 +1 @@ + diff --git a/packages/builder/src/pages/builder/app/[application]/design/[tab]/[assetType]/[asset]/_fallback.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/_old/[assetType]/[asset]/_fallback.svelte similarity index 100% rename from packages/builder/src/pages/builder/app/[application]/design/[tab]/[assetType]/[asset]/_fallback.svelte rename to packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/_old/[assetType]/[asset]/_fallback.svelte diff --git a/packages/builder/src/pages/builder/app/[application]/design/[tab]/[assetType]/_layout.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/_old/[assetType]/_layout.svelte similarity index 86% rename from packages/builder/src/pages/builder/app/[application]/design/[tab]/[assetType]/_layout.svelte rename to packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/_old/[assetType]/_layout.svelte index 44240c61f1..e79ae0287c 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[tab]/[assetType]/_layout.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/_old/[assetType]/_layout.svelte @@ -156,24 +156,7 @@
- {#if $currentAsset} -
- - {#if $store.clientFeatures.devicePreview} - - {/if} - {#if $store.clientFeatures.customThemes} - - {:else if $store.clientFeatures.spectrumThemes} - - {/if} -
-
- {#key $store.version} - - {/key} -
- {:else} + {#if $currentAsset}{:else}
@@ -247,34 +230,6 @@ border-right: var(--border-light); } - .preview-pane { - grid-column: 2; - overflow-y: auto; - display: flex; - flex-direction: column; - justify-content: flex-start; - align-items: stretch; - gap: var(--spacing-m); - padding: var(--spacing-xl) 40px; - } - .preview-header { - display: flex; - flex-direction: row; - justify-content: flex-start; - align-items: flex-start; - gap: 1rem; - } - .preview-header > :global(*) { - flex: 0 0 auto; - } - .preview-header > :global(*:first-child) { - flex: 1 1 auto; - } - - .preview-content { - flex: 1 1 auto; - } - .components-pane { grid-column: 3; background-color: var(--background); diff --git a/packages/builder/src/pages/builder/app/[application]/design/[tab]/[assetType]/index.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/_old/[assetType]/index.svelte similarity index 100% rename from packages/builder/src/pages/builder/app/[application]/design/[tab]/[assetType]/index.svelte rename to packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/_old/[assetType]/index.svelte diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/index.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/index.svelte new file mode 100644 index 0000000000..abd49b91e1 --- /dev/null +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/screens/index.svelte @@ -0,0 +1,69 @@ + + + + + (searchString = e.detail)} + /> +