diff --git a/packages/builder/src/builderStore/store/screenTemplates/utils/sanitizeUrl.js b/packages/builder/src/builderStore/store/screenTemplates/utils/sanitizeUrl.js index 16224a45bc..4d00c503fb 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/utils/sanitizeUrl.js +++ b/packages/builder/src/builderStore/store/screenTemplates/utils/sanitizeUrl.js @@ -2,9 +2,15 @@ export default function (url) { return url .split("/") .map(part => { - // if parameter, then use as is - if (part.startsWith(":")) return part - return encodeURIComponent(part.replace(/ /g, "-")) + part = decodeURIComponent(part) + part = part.replace(/ /g, "-") + + // If parameter, then use as is + if (!part.startsWith(":")) { + part = encodeURIComponent(part) + } + + return part }) .join("/") .toLowerCase() diff --git a/packages/builder/src/components/common/TemplateCard.svelte b/packages/builder/src/components/common/TemplateCard.svelte index 1271f6aa24..5ab8c3d774 100644 --- a/packages/builder/src/components/common/TemplateCard.svelte +++ b/packages/builder/src/components/common/TemplateCard.svelte @@ -6,15 +6,10 @@ export let overlayEnabled = true let imageError = false - let imageLoaded = false const imageRenderError = () => { imageError = true } - - const imageLoadSuccess = () => { - imageLoaded = true - }
@@ -23,8 +18,7 @@ alt={name} src={imageSrc} on:error={imageRenderError} - on:load={imageLoadSuccess} - class={`${imageLoaded ? "loaded" : ""}`} + class:error={imageError} />
{ const sortedPaths = Object.keys(allRoutes || {}).sort() - const selectedRoleId = $selectedAccessRole - const selectedScreenId = $store.selectedScreenId let found = false let firstValidScreenId @@ -41,11 +42,15 @@ }) }) }) - routes = filteredRoutes + routes = { ...filteredRoutes } + paths = Object.keys(routes || {}).sort() // Select the correct role for the current screen ID if (!found && screenRoleId) { selectedAccessRole.set(screenRoleId) + if (screenRoleId !== selectedRoleId) { + updatePaths(allRoutes, screenRoleId, selectedScreenId) + } } // If the selected screen isn't in this filtered list, select the first one diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/actions/TriggerAutomation.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/actions/TriggerAutomation.svelte index e5b4c9d108..fa32c88d65 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/actions/TriggerAutomation.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/actions/TriggerAutomation.svelte @@ -19,7 +19,7 @@ .filter(a => a.definition.trigger?.stepId === "APP") .map(automation => { const schema = Object.entries( - automation.definition.trigger.inputs.fields + automation.definition.trigger.inputs.fields || {} ).map(([name, type]) => ({ name, type })) return { diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/RoleSelect.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/RoleSelect.svelte index be6fc8cb12..9571cf9a92 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/RoleSelect.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/RoleSelect.svelte @@ -3,6 +3,7 @@ import { roles } from "stores/backend" export let value + export let error
- {welcomeHeader} - + {welcomeHeader} + {welcomeBody} @@ -301,7 +301,7 @@