This commit is contained in:
mike12345567 2020-12-15 16:42:40 +00:00
parent 21978007cf
commit c65ed9ad46
5 changed files with 14 additions and 8 deletions

View File

@ -7,7 +7,7 @@ const INITIAL_BACKEND_UI_STATE = {
}
export const getHostingStore = () => {
const store = writable({...INITIAL_BACKEND_UI_STATE})
const store = writable({ ...INITIAL_BACKEND_UI_STATE })
store.actions = {
fetch: async () => {
const response = await api.get("/api/hosting/")
@ -28,7 +28,7 @@ export const getHostingStore = () => {
}
return state
})
}
},
}
return store

View File

@ -7,7 +7,7 @@
<div>
<Button text on:click={modal.show}>
<i class="ri-settings-3-fill"></i>
<i class="ri-settings-3-fill" />
<p>Settings</p>
</Button>
</div>

View File

@ -24,13 +24,19 @@
onMount(async () => {
hostingInfo = await hostingStore.actions.fetch()
selfhosted = hostingInfo.type === "self"
})
</script>
<ModalContent title="Builder settings" confirmText="Save" onConfirm={save} showConfirmButton={selfhosted}>
<ModalContent
title="Builder settings"
confirmText="Save"
onConfirm={save}
showConfirmButton={selfhosted}>
<h5>Hosting</h5>
<p>This section contains settings that relate to the deployment and hosting of apps made in this builder.</p>
<p>
This section contains settings that relate to the deployment and hosting of
apps made in this builder.
</p>
<Toggle thin text="Self hosted" bind:checked={selfhosted} />
{#if selfhosted}
<Input bind:value={hostingInfo.appServerUrl} label="Apps URL" />

View File

@ -39,7 +39,7 @@
href="https://github.com/Budibase/budibase/issues/new/choose" />
</div>
<div class="nav-bottom">
<BuilderSettingsButton/>
<BuilderSettingsButton />
</div>
</div>
</div>

View File

@ -32,7 +32,7 @@ exports.getHostingInfo = async () => {
return doc
}
exports.getAppServerUrl = async (appId) => {
exports.getAppServerUrl = async appId => {
const hostingInfo = await exports.getHostingInfo()
const protocol = getProtocol(hostingInfo)
let url