Update builder settings modal to use spectrum components

This commit is contained in:
Andrew Kingston 2021-04-20 10:26:20 +01:00
parent 1bc678ad9e
commit 69e519c460
1 changed files with 4 additions and 6 deletions

View File

@ -30,7 +30,7 @@
} }
function updateSelfHosting(event) { function updateSelfHosting(event) {
if (hostingInfo.type === HostingTypes.CLOUD && event.target.checked) { if (hostingInfo.type === HostingTypes.CLOUD && event.detail) {
hostingInfo.hostingUrl = "localhost:10000" hostingInfo.hostingUrl = "localhost:10000"
hostingInfo.useHttps = false hostingInfo.useHttps = false
hostingInfo.selfHostKey = "budibase" hostingInfo.selfHostKey = "budibase"
@ -60,14 +60,13 @@
apps made in this builder. apps made in this builder.
</p> </p>
<Toggle <Toggle
thin
text="Self hosted" text="Self hosted"
on:change={updateSelfHosting} on:change={updateSelfHosting}
bind:checked={selfhosted} /> bind:value={selfhosted} />
{#if selfhosted} {#if selfhosted}
<Input bind:value={hostingInfo.hostingUrl} label="Hosting URL" /> <Input bind:value={hostingInfo.hostingUrl} label="Hosting URL" />
<Input bind:value={hostingInfo.selfHostKey} label="Hosting Key" /> <Input bind:value={hostingInfo.selfHostKey} label="Hosting Key" />
<Toggle thin text="HTTPS" bind:checked={hostingInfo.useHttps} /> <Toggle text="HTTPS" bind:value={hostingInfo.useHttps} />
{/if} {/if}
<h5>Analytics</h5> <h5>Analytics</h5>
<p> <p>
@ -75,9 +74,8 @@
please let us know below. please let us know below.
</p> </p>
<Toggle <Toggle
thin
text="Send Analytics To Budibase" text="Send Analytics To Budibase"
checked={!analyticsDisabled} value={!analyticsDisabled}
on:change={toggleAnalytics} /> on:change={toggleAnalytics} />
</ModalContent> </ModalContent>