diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Navigation/index.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Navigation/index.svelte
index 383026c4f8..f9f994ce67 100644
--- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Navigation/index.svelte
+++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Navigation/index.svelte
@@ -15,10 +15,15 @@
Checkbox,
notifications,
Select,
+ Combobox,
} from "@budibase/bbui"
import { selectedScreen, store } from "builderStore"
import { DefaultAppTheme } from "constants"
+ $: screenRouteOptions = $store.screens
+ .map(screen => screen.routing?.route)
+ .filter(x => x != null)
+
const updateShowNavigation = async e => {
await store.actions.screens.updateSetting(
get(selectedScreen),
@@ -107,23 +112,6 @@
on:change={e => update("navWidth", e.detail)}
/>
{/if}
-
-
-
- update("hideLogo", !e.detail)}
- />
- {#if !$store.navigation.hideLogo}
-
-
-
- update("logoUrl", e.detail)}
- updateOnChange={false}
- />
- {/if}
@@ -160,6 +148,47 @@
/>
+
+
+
+
+ Logo
+
+
+
+
+
+
update("hideLogo", !e.detail)}
+ />
+ {#if !$store.navigation.hideLogo}
+
+
+
+ update("logoUrl", e.detail)}
+ updateOnChange={false}
+ />
+
+
+
+ update("logoLinkUrl", e.detail)}
+ options={screenRouteOptions}
+ />
+
+
+
+ update("openLogoLinkInNewTab", !!e.detail)}
+ />
+ {/if}
+
+
{/if}
diff --git a/packages/client/src/components/app/Layout.svelte b/packages/client/src/components/app/Layout.svelte
index bdab0dd9ab..2ca57a3dde 100644
--- a/packages/client/src/components/app/Layout.svelte
+++ b/packages/client/src/components/app/Layout.svelte
@@ -33,6 +33,8 @@
export let navTextColor
export let navWidth
export let pageWidth
+ export let logoLinkUrl
+ export let openLogoLinkInNewTab
export let embedded = false
@@ -150,6 +152,16 @@
}
return style
}
+
+ const getSanitizedUrl = (url, openInNewTab) => {
+ if (!isInternal(url)) {
+ return ensureExternal(url)
+ }
+ if (openInNewTab) {
+ return `#${url}`
+ }
+ return url
+ }
{#if !hideLogo}
-
+ {#if logoLinkUrl && isInternal(logoLinkUrl) && !openLogoLinkInNewTab}
+
+
+
+ {:else if logoLinkUrl}
+
+
+
+ {:else}
+
+ {/if}
{/if}
{#if !hideTitle && title}
{title}