1
0
Fork 0
mirror of synced 2024-06-27 02:20:35 +12:00

Merge branch 'fix/13282' of github.com:Budibase/budibase into fix/13282

This commit is contained in:
mike12345567 2024-03-19 16:52:54 +00:00
commit 83cafa56c5
3 changed files with 23 additions and 1 deletions

View file

@ -24,6 +24,13 @@
navigationStore,
} from "stores/builder"
import { DefaultAppTheme } from "constants"
import BarButtonList from "/src/components/design/settings/controls/BarButtonList.svelte"
$: alignmentOptions = [
{ value: "Left", barIcon: "TextAlignLeft" },
{ value: "Center", barIcon: "TextAlignCenter" },
{ value: "Right", barIcon: "TextAlignRight" },
]
$: screenRouteOptions = $screenStore.screens
.map(screen => screen.routing?.route)
@ -46,6 +53,10 @@
notifications.error("Error updating navigation settings")
}
}
const updateTextAlign = textAlignValue => {
navigationStore.syncAppNavigation({ textAlign: textAlignValue })
}
</script>
<Panel
@ -133,6 +144,15 @@
on:change={e => update("title", e.detail)}
updateOnChange={false}
/>
<div class="label">
<Label size="M">Text align</Label>
</div>
<BarButtonList
options={alignmentOptions}
value={$navigationStore.textAlign}
onChange={updateTextAlign}
/>
{/if}
<div class="label">
<Label>Background</Label>

View file

@ -11,6 +11,7 @@ export const INITIAL_NAVIGATION_STATE = {
hideLogo: null,
logoUrl: null,
hideTitle: null,
textAlign: "Left",
navBackground: null,
navWidth: null,
navTextColor: null,

View file

@ -36,6 +36,7 @@
export let pageWidth
export let logoLinkUrl
export let openLogoLinkInNewTab
export let textAlign
export let embedded = false
@ -226,7 +227,7 @@
{/if}
{/if}
{#if !hideTitle && title}
<Heading size="S">{title}</Heading>
<Heading size="S" {textAlign}>{title}</Heading>
{/if}
</div>
{#if !embedded}