forked from tsai/budibase
9 changed files with 66 additions and 107 deletions
@ -1,12 +0,0 @@ |
|||||
<script> |
|
||||
import { themeStore } from "builderStore" |
|
||||
import { Select } from "@budibase/bbui" |
|
||||
import { capitalise } from "../../helpers" |
|
||||
</script> |
|
||||
|
|
||||
<Select |
|
||||
options={$themeStore.options} |
|
||||
bind:value={$themeStore.theme} |
|
||||
placeholder={null} |
|
||||
getOptionLabel={capitalise} |
|
||||
/> |
|
||||
@ -1,35 +0,0 @@ |
|||||
<script> |
|
||||
import { Icon, Label, Modal, ModalContent } from "@budibase/bbui" |
|
||||
import ThemeEditor from "./ThemeEditor.svelte" |
|
||||
|
|
||||
let modal |
|
||||
</script> |
|
||||
|
|
||||
<div class="topnavitemright" on:click={modal.show}> |
|
||||
<Icon hoverable name="ColorFill" /> |
|
||||
</div> |
|
||||
<Modal bind:this={modal}> |
|
||||
<ModalContent |
|
||||
title="Builder Theme" |
|
||||
confirmText="Done" |
|
||||
showCancelButton={false} |
|
||||
> |
|
||||
<ThemeEditor /> |
|
||||
</ModalContent> |
|
||||
</Modal> |
|
||||
|
|
||||
<style> |
|
||||
.topnavitemright { |
|
||||
cursor: pointer; |
|
||||
color: var(--grey-7); |
|
||||
margin: 0 12px 0 0; |
|
||||
font-weight: 500; |
|
||||
font-size: 1rem; |
|
||||
display: flex; |
|
||||
flex-direction: row; |
|
||||
justify-content: center; |
|
||||
align-items: center; |
|
||||
height: 24px; |
|
||||
width: 24px; |
|
||||
} |
|
||||
</style> |
|
||||
@ -1,42 +0,0 @@ |
|||||
<script> |
|
||||
import { |
|
||||
Heading, |
|
||||
Divider, |
|
||||
notifications, |
|
||||
ModalContent, |
|
||||
Toggle, |
|
||||
Body, |
|
||||
} from "@budibase/bbui" |
|
||||
import ThemeEditor from "components/settings/ThemeEditor.svelte" |
|
||||
import analytics from "analytics" |
|
||||
|
|
||||
$: analyticsDisabled = analytics.disabled() |
|
||||
|
|
||||
async function save() { |
|
||||
notifications.success(`Settings saved.`) |
|
||||
} |
|
||||
|
|
||||
function toggleAnalytics() { |
|
||||
if (analyticsDisabled) { |
|
||||
analytics.optIn() |
|
||||
} else { |
|
||||
analytics.optOut() |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<ModalContent title="Builder settings" confirmText="Save" onConfirm={save}> |
|
||||
<Heading size="XS">Theme</Heading> |
|
||||
<ThemeEditor /> |
|
||||
<Divider noMargin noGrid /> |
|
||||
<Heading size="XS">Analytics</Heading> |
|
||||
<Body size="S"> |
|
||||
If you would like to send analytics that help us make budibase better, |
|
||||
please let us know below. |
|
||||
</Body> |
|
||||
<Toggle |
|
||||
text="Send Analytics To Budibase" |
|
||||
value={!analyticsDisabled} |
|
||||
on:change={toggleAnalytics} |
|
||||
/> |
|
||||
</ModalContent> |
|
||||
@ -0,0 +1,36 @@ |
|||||
|
<script> |
||||
|
import { Layout, Heading, Body, Divider, Label, Select } from "@budibase/bbui" |
||||
|
import { themeStore } from "builderStore" |
||||
|
import { capitalise } from "helpers" |
||||
|
</script> |
||||
|
|
||||
|
<Layout> |
||||
|
<Layout gap="XS" noPadding> |
||||
|
<Heading size="M">Theming</Heading> |
||||
|
<Body>Customize how Budibase looks and feels.</Body> |
||||
|
</Layout> |
||||
|
<Divider size="S" /> |
||||
|
<div class="fields"> |
||||
|
<div class="field"> |
||||
|
<Label size="L">Builder theme</Label> |
||||
|
<Select |
||||
|
options={$themeStore.options} |
||||
|
bind:value={$themeStore.theme} |
||||
|
placeholder={null} |
||||
|
getOptionLabel={capitalise} |
||||
|
/> |
||||
|
</div> |
||||
|
</div> |
||||
|
</Layout> |
||||
|
|
||||
|
<style> |
||||
|
.fields { |
||||
|
display: grid; |
||||
|
grid-gap: var(--spacing-m); |
||||
|
} |
||||
|
.field { |
||||
|
display: grid; |
||||
|
grid-template-columns: 33% 1fr; |
||||
|
align-items: center; |
||||
|
} |
||||
|
</style> |
||||
Loading…
Reference in new issue