This commit is contained in:
mike12345567 2021-01-06 17:28:22 +00:00
parent 0f4dcbc3e2
commit b6e5658f4e
6 changed files with 35 additions and 29 deletions

View File

@ -16,23 +16,23 @@
{/if}
{#if $themeStore.darkMode && showAdvanced}
<Slider
label="Hue"
bind:value={$themeStore.hue}
min="0"
max="360"
showValue />
label="Hue"
bind:value={$themeStore.hue}
min="0"
max="360"
showValue />
<Slider
label="Saturation"
bind:value={$themeStore.saturation}
min="0"
max="100"
showValue />
label="Saturation"
bind:value={$themeStore.saturation}
min="0"
max="100"
showValue />
<Slider
label="Lightness"
bind:value={$themeStore.lightness}
min="0"
max="32"
showValue />
label="Lightness"
bind:value={$themeStore.lightness}
min="0"
max="32"
showValue />
<div class="button">
<Button text on:click={themeStore.reset}>Reset</Button>
</div>
@ -51,4 +51,4 @@
.button {
align-self: flex-start;
}
</style>
</style>

View File

@ -1,5 +1,4 @@
<script>
import { Label, DropdownMenu } from "@budibase/bbui"
import ThemeEditor from "./ThemeEditor.svelte"

View File

@ -27,7 +27,6 @@
}
function updateSelfHosting(event) {
if (hostingInfo.type === "cloud" && event.target.checked) {
hostingInfo.hostingUrl = "localhost:10000"
hostingInfo.useHttps = false
@ -41,10 +40,7 @@
})
</script>
<ModalContent
title="Builder settings"
confirmText="Save"
onConfirm={save}>
<ModalContent title="Builder settings" confirmText="Save" onConfirm={save}>
<h5>Theme</h5>
<ThemeEditor />
<h5>Hosting</h5>
@ -52,7 +48,11 @@
This section contains settings that relate to the deployment and hosting of
apps made in this builder.
</p>
<Toggle thin text="Self hosted" on:change={updateSelfHosting} bind:checked={selfhosted} />
<Toggle
thin
text="Self hosted"
on:change={updateSelfHosting}
bind:checked={selfhosted} />
{#if selfhosted}
<Input bind:value={hostingInfo.hostingUrl} label="Hosting URL" />
<Input bind:value={hostingInfo.selfHostKey} label="Hosting Key" />

View File

@ -1,6 +1,11 @@
<script>
import { writable } from "svelte/store"
import { store, automationStore, backendUiStore, hostingStore } from "builderStore"
import {
store,
automationStore,
backendUiStore,
hostingStore,
} from "builderStore"
import { string, object } from "yup"
import api, { get } from "builderStore/api"
import Form from "@svelteschool/svelte-forms"
@ -12,7 +17,7 @@
import { fade } from "svelte/transition"
import { post } from "builderStore/api"
import analytics from "analytics"
import {onMount} from "svelte"
import { onMount } from "svelte"
//Move this to context="module" once svelte-forms is updated so that it can bind to stores correctly
const createAppStore = writable({ currentStep: 0, values: {} })

View File

@ -11,7 +11,7 @@ const PUBLIC_READ_POLICY = {
{
Effect: "Allow",
Principal: {
AWS: ["*"]
AWS: ["*"],
},
Action: "s3:GetObject",
Resource: [`arn:aws:s3:::${APP_BUCKET}/*`],
@ -65,8 +65,7 @@ async function getMinioSession() {
Bucket: APP_BUCKET,
})
.promise()
}
else {
} else {
throw err
}
}

View File

@ -1,7 +1,10 @@
const env = require("../environment")
module.exports = async (ctx, next) => {
if (!ctx.request.body.selfHostKey || env.SELF_HOST_KEY !== ctx.request.body.selfHostKey) {
if (
!ctx.request.body.selfHostKey ||
env.SELF_HOST_KEY !== ctx.request.body.selfHostKey
) {
ctx.throw(401, "Deployment unauthorised")
} else {
await next()