diff --git a/packages/builder/src/builderStore/dataBinding.js b/packages/builder/src/builderStore/dataBinding.js index efd56e9d4b..386b47105d 100644 --- a/packages/builder/src/builderStore/dataBinding.js +++ b/packages/builder/src/builderStore/dataBinding.js @@ -504,22 +504,33 @@ const getDeviceBindings = () => { let bindings = [] if (get(store).clientFeatures?.deviceAwareness) { const safeDevice = makePropSafe("device") - bindings.push({ - type: "context", - runtimeBinding: `${safeDevice}.${makePropSafe("mobile")}`, - readableBinding: `Device.Mobile`, - category: "Device", - icon: "DevicePhone", - display: { type: "boolean", name: "mobile" }, - }) - bindings.push({ - type: "context", - runtimeBinding: `${safeDevice}.${makePropSafe("tablet")}`, - readableBinding: `Device.Tablet`, - category: "Device", - icon: "DevicePhone", - display: { type: "boolean", name: "tablet" }, - }) + + bindings = [ + { + type: "context", + runtimeBinding: `${safeDevice}.${makePropSafe("mobile")}`, + readableBinding: `Device.Mobile`, + category: "Device", + icon: "DevicePhone", + display: { type: "boolean", name: "mobile" }, + }, + { + type: "context", + runtimeBinding: `${safeDevice}.${makePropSafe("tablet")}`, + readableBinding: `Device.Tablet`, + category: "Device", + icon: "DevicePhone", + display: { type: "boolean", name: "tablet" }, + }, + { + type: "context", + runtimeBinding: `${safeDevice}.${makePropSafe("theme")}`, + readableBinding: `App.Theme`, + category: "Device", + icon: "DevicePhone", + display: { type: "string", name: "App Theme" }, + }, + ] } return bindings } diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Component/ComponentSettingsPanel.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Component/ComponentSettingsPanel.svelte index 581e69cfaf..afcada4138 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Component/ComponentSettingsPanel.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Component/ComponentSettingsPanel.svelte @@ -21,6 +21,7 @@ $selectedScreen, $store.selectedComponentId ) + $: componentBindings = getComponentBindableProperties( $selectedScreen, $store.selectedComponentId diff --git a/packages/client/src/components/context/DeviceBindingsProvider.svelte b/packages/client/src/components/context/DeviceBindingsProvider.svelte index 508f7c78c5..2bd21d02e7 100644 --- a/packages/client/src/components/context/DeviceBindingsProvider.svelte +++ b/packages/client/src/components/context/DeviceBindingsProvider.svelte @@ -1,6 +1,7 @@