From c9df4e5cb9802a015fcd3a5e7371222a0be1d22f Mon Sep 17 00:00:00 2001
From: Andrew Kingston
Date: Thu, 27 Oct 2022 09:06:07 +0100
Subject: [PATCH 001/207] Update BB logo to black
---
packages/builder/assets/bb-emblem.svg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/builder/assets/bb-emblem.svg b/packages/builder/assets/bb-emblem.svg
index 9f4f3690d5..7d499e4862 100644
--- a/packages/builder/assets/bb-emblem.svg
+++ b/packages/builder/assets/bb-emblem.svg
@@ -3,7 +3,7 @@
To upgrade your plan and usage limits visit your
account.
diff --git a/packages/builder/src/pages/builder/portal/users/groups/[groupId].svelte b/packages/builder/src/pages/builder/portal/users/groups/[groupId].svelte
index 859e266ef0..ee584dd71b 100644
--- a/packages/builder/src/pages/builder/portal/users/groups/[groupId].svelte
+++ b/packages/builder/src/pages/builder/portal/users/groups/[groupId].svelte
@@ -250,7 +250,7 @@
flex-direction: row;
justify-content: flex-start;
align-items: center;
- gap: var(--spacing-m);
+ gap: var(--spacing-l);
}
.header :global(.spectrum-Heading) {
flex: 1 1 auto;
diff --git a/packages/builder/src/pages/builder/portal/users/users/[userId].svelte b/packages/builder/src/pages/builder/portal/users/users/[userId].svelte
index 9498472f66..26a1d25f44 100644
--- a/packages/builder/src/pages/builder/portal/users/users/[userId].svelte
+++ b/packages/builder/src/pages/builder/portal/users/users/[userId].svelte
@@ -389,6 +389,7 @@
display: flex;
align-items: center;
justify-content: flex-start;
+ gap: var(--spacing-l);
}
.tableTitle {
display: flex;
@@ -396,7 +397,6 @@
align-items: flex-end;
}
.subtitle {
- padding: 0 0 0 var(--spacing-m);
display: flex;
flex-direction: column;
justify-content: center;
From 66c6b6dec3ffca124f8231305315c8d37d4b9338 Mon Sep 17 00:00:00 2001
From: Andrew Kingston
Date: Fri, 13 Jan 2023 09:26:35 +0000
Subject: [PATCH 083/207] Fix logo override not working
---
.../src/pages/builder/portal/_components/Logo.svelte | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/packages/builder/src/pages/builder/portal/_components/Logo.svelte b/packages/builder/src/pages/builder/portal/_components/Logo.svelte
index 8276510201..811e4a162a 100644
--- a/packages/builder/src/pages/builder/portal/_components/Logo.svelte
+++ b/packages/builder/src/pages/builder/portal/_components/Logo.svelte
@@ -1,9 +1,14 @@
- $goto("./apps")} />
+ $goto("./apps")}
+/>
From 355fb6fda2e5dcb04525c870eabd2011092ee756 Mon Sep 17 00:00:00 2001
From: Andrew Kingston
Date: Fri, 13 Jan 2023 12:11:14 +0000
Subject: [PATCH 092/207] Make usage stats responsive and fix layout issues
---
.../builder/src/components/usage/Usage.svelte | 29 ++++++++++++-------
.../pages/builder/portal/account/usage.svelte | 1 +
2 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/packages/builder/src/components/usage/Usage.svelte b/packages/builder/src/components/usage/Usage.svelte
index 49c4205a4c..6e81abfe63 100644
--- a/packages/builder/src/components/usage/Usage.svelte
+++ b/packages/builder/src/components/usage/Usage.svelte
@@ -39,15 +39,21 @@
{#if showWarning}
{/if}
-
+
+
+ {usage.name}
+
+
- {#if unlimited}
- {usage.used} / Unlimited
- {:else}
- {usage.used} / {usage.total}
- {/if}
+
+
+ {#if unlimited}
+ {usage.used} / Unlimited
+ {:else}
+ {usage.used} / {usage.total}
+ {/if}
+
+
{#if unlimited}
@@ -89,13 +95,14 @@
display: flex;
flex-direction: row;
justify-content: space-between;
+ align-items: flex-end;
margin-bottom: 12px;
+ gap: var(--spacing-m);
}
.header-container {
display: flex;
}
- .heading {
- margin-top: 3px;
- margin-left: 5px;
+ .nowrap {
+ white-space: nowrap;
}
diff --git a/packages/builder/src/pages/builder/portal/account/usage.svelte b/packages/builder/src/pages/builder/portal/account/usage.svelte
index c502d35f79..39970a4814 100644
--- a/packages/builder/src/pages/builder/portal/account/usage.svelte
+++ b/packages/builder/src/pages/builder/portal/account/usage.svelte
@@ -249,6 +249,7 @@
justify-content: flex-start;
align-items: flex-start;
gap: 40px;
+ flex-wrap: wrap;
}
.column {
flex: 1 1 0;
From f00034544fc41f22a70db2b68be95a333d36516b Mon Sep 17 00:00:00 2001
From: Peter Clement
Date: Fri, 13 Jan 2023 16:39:26 +0000
Subject: [PATCH 093/207] reuse modal for edit and create and add delete
function
---
.../CreateEditVariableModal.svelte | 89 +++++++++++++++++++
.../_components/EditVariableColumn.svelte | 35 ++++++++
.../_components/editVariableModal.svelte | 69 --------------
.../portal/settings/environment/index.svelte | 48 +++-------
packages/builder/src/stores/portal/envVars.js | 27 ------
.../builder/src/stores/portal/environment.js | 38 ++++++++
packages/builder/src/stores/portal/index.js | 2 +-
packages/frontend-core/src/api/envVars.js | 18 ----
.../src/api/environmentVariables.js | 30 +++++++
packages/frontend-core/src/api/index.js | 3 +-
10 files changed, 207 insertions(+), 152 deletions(-)
create mode 100644 packages/builder/src/pages/builder/portal/settings/environment/_components/CreateEditVariableModal.svelte
create mode 100644 packages/builder/src/pages/builder/portal/settings/environment/_components/EditVariableColumn.svelte
delete mode 100644 packages/builder/src/pages/builder/portal/settings/environment/_components/editVariableModal.svelte
delete mode 100644 packages/builder/src/stores/portal/envVars.js
create mode 100644 packages/builder/src/stores/portal/environment.js
delete mode 100644 packages/frontend-core/src/api/envVars.js
create mode 100644 packages/frontend-core/src/api/environmentVariables.js
diff --git a/packages/builder/src/pages/builder/portal/settings/environment/_components/CreateEditVariableModal.svelte b/packages/builder/src/pages/builder/portal/settings/environment/_components/CreateEditVariableModal.svelte
new file mode 100644
index 0000000000..0ea487c885
--- /dev/null
+++ b/packages/builder/src/pages/builder/portal/settings/environment/_components/CreateEditVariableModal.svelte
@@ -0,0 +1,89 @@
+
+
+
+ save({
+ name,
+ production: productionValue,
+ development: developmentValue,
+ })}
+ title={!row ? "Add new environment variable" : "Edit environment variable"}
+>
+
+
+ Production
+ {
+ productionValue = e.detail
+ if (useProductionValue) {
+ developmentValue = e.detail
+ }
+ }}
+ value={productionValue}
+ />
+
+
+ Development
+ {
+ developmentValue = e.target.value
+ }}
+ disabled={useProductionValue}
+ label="Value"
+ value={useProductionValue ? productionValue : developmentValue}
+ />
+
+
+
+
+
+
+ {
+ deleteVariable(row.name)
+ }}
+ okText="Delete Environment Variable"
+ title="Confirm Deletion"
+>
+ Are you sure you wish to delete the environment variable
+ {row.name}?
+ This action cannot be undone.
+
diff --git a/packages/builder/src/pages/builder/portal/settings/environment/_components/EditVariableColumn.svelte b/packages/builder/src/pages/builder/portal/settings/environment/_components/EditVariableColumn.svelte
new file mode 100644
index 0000000000..83f37d3fdb
--- /dev/null
+++ b/packages/builder/src/pages/builder/portal/settings/environment/_components/EditVariableColumn.svelte
@@ -0,0 +1,35 @@
+
+
+Edit
+
+
+
+
+
+ {
+ environment.deleteVariable(row.name)
+ }}
+ okText="Delete Environment Variable"
+ title="Confirm Deletion"
+>
+ Are you sure you wish to delete the environment variable
+ {row.name}?
+ This action cannot be undone.
+
diff --git a/packages/builder/src/pages/builder/portal/settings/environment/_components/editVariableModal.svelte b/packages/builder/src/pages/builder/portal/settings/environment/_components/editVariableModal.svelte
deleted file mode 100644
index a6e9cd50bb..0000000000
--- a/packages/builder/src/pages/builder/portal/settings/environment/_components/editVariableModal.svelte
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-Edit
-
-
-
-
-
-
- Production
- (productionTouched = true)}
- label="Value"
- bind:value={productionValue}
- />
-
-
- Development
- (developmentTouched = true)}
- label="Value"
- bind:value={developmentValue}
- />
-
-
-
-
-
-
-
- {
- console.log("delete")
- }}
- okText="Delete Environment Variable"
- title="Confirm Deletion"
->
- Are you sure you wish to delete the environment variable
- {row.name}?
- This action cannot be undone.
-
diff --git a/packages/builder/src/pages/builder/portal/settings/environment/index.svelte b/packages/builder/src/pages/builder/portal/settings/environment/index.svelte
index ab52ceb1bf..06cfc02085 100644
--- a/packages/builder/src/pages/builder/portal/settings/environment/index.svelte
+++ b/packages/builder/src/pages/builder/portal/settings/environment/index.svelte
@@ -6,21 +6,15 @@
Button,
Divider,
Modal,
- ModalContent,
Table,
- Input,
- Checkbox,
} from "@budibase/bbui"
- import { envVars } from "stores/portal"
+ import { environment } from "stores/portal"
import { onMount } from "svelte"
- import EditVariableModal from "./_components/editVariableModal.svelte"
+ import CreateEditVariableModal from "./_components/CreateEditVariableModal.svelte"
+ import EditVariableColumn from "./_components/EditVariableColumn.svelte"
let modal
- let useProductionValue = true
-
- let developmentValue
- let productionValue
const schema = {
name: {
width: "2fr",
@@ -32,11 +26,16 @@
},
}
- const customRenderers = [{ column: "edit", component: EditVariableModal }]
+ const customRenderers = [{ column: "edit", component: EditVariableColumn }]
onMount(async () => {
- await envVars.load()
+ await environment.loadVariables()
})
+
+ const save = data => {
+ environment.createVariable(data)
+ modal.hide()
+ }
@@ -50,7 +49,7 @@
-
-
-
-
- Production
-
-
-
- Development
-
- {
- developmentValue = productionValue
- }}
- bind:value={useProductionValue}
- text="Use production value"
- />
-
-
+
diff --git a/packages/frontend-core/src/components/TestimonialPage.svelte b/packages/frontend-core/src/components/TestimonialPage.svelte
new file mode 100644
index 0000000000..d0b772d5db
--- /dev/null
+++ b/packages/frontend-core/src/components/TestimonialPage.svelte
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+ "Here is an example of how Budibase changed my life for the better and
+ now all I do is eat, sleep, build apps, repeat."
+
+
+
+
+
No-code Enthusiast
+
Bedroom TLD
+
+
+
+
+
+
+
+
diff --git a/packages/frontend-core/src/components/index.js b/packages/frontend-core/src/components/index.js
new file mode 100644
index 0000000000..7ca21c4ff9
--- /dev/null
+++ b/packages/frontend-core/src/components/index.js
@@ -0,0 +1,2 @@
+export { default as SplitPage } from "./SplitPage.svelte"
+export { default as TestimonialPage } from "./TestimonialPage.svelte"
diff --git a/packages/frontend-core/src/index.js b/packages/frontend-core/src/index.js
index aecca81cda..01bf05c69e 100644
--- a/packages/frontend-core/src/index.js
+++ b/packages/frontend-core/src/index.js
@@ -3,3 +3,4 @@ export { fetchData } from "./fetch/fetchData"
export * as Constants from "./constants"
export * from "./stores"
export * from "./utils"
+export * from "./components"
From 95e8371b1d0cb9e5bee3c5d5b55db7419dd97287 Mon Sep 17 00:00:00 2001
From: mike12345567
Date: Mon, 16 Jan 2023 18:51:48 +0000
Subject: [PATCH 099/207] Adding encryption key to manage of server.
---
packages/server/scripts/dev/manage.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/packages/server/scripts/dev/manage.js b/packages/server/scripts/dev/manage.js
index 80f21cd043..b8566bbf4c 100644
--- a/packages/server/scripts/dev/manage.js
+++ b/packages/server/scripts/dev/manage.js
@@ -29,6 +29,7 @@ async function init() {
ACCOUNT_PORTAL_URL: "http://localhost:10001",
ACCOUNT_PORTAL_API_KEY: "budibase",
JWT_SECRET: "testsecret",
+ ENCRYPTION_KEY: "testsecret",
REDIS_PASSWORD: "budibase",
MINIO_ACCESS_KEY: "budibase",
MINIO_SECRET_KEY: "budibase",
From b312ac68c8412fdcc7dec863c8872f15b396b8df Mon Sep 17 00:00:00 2001
From: Andrew Kingston
Date: Tue, 17 Jan 2023 09:58:29 +0000
Subject: [PATCH 100/207] Add initial work on fancy form components for
onboarding
---
.../bbui/src/FancyForm/FancyButton.svelte | 29 ++++
packages/bbui/src/FancyForm/FancyField.svelte | 72 ++++++++++
packages/bbui/src/FancyForm/FancyForm.svelte | 40 ++++++
packages/bbui/src/FancyForm/FancyInput.svelte | 99 ++++++++++++++
packages/bbui/src/FancyForm/index.js | 3 +
packages/bbui/src/index.js | 3 +
.../auth/_components/GoogleButton.svelte | 46 +++----
.../src/pages/builder/auth/login.svelte | 125 +++++++++++-------
8 files changed, 338 insertions(+), 79 deletions(-)
create mode 100644 packages/bbui/src/FancyForm/FancyButton.svelte
create mode 100644 packages/bbui/src/FancyForm/FancyField.svelte
create mode 100644 packages/bbui/src/FancyForm/FancyForm.svelte
create mode 100644 packages/bbui/src/FancyForm/FancyInput.svelte
create mode 100644 packages/bbui/src/FancyForm/index.js
diff --git a/packages/bbui/src/FancyForm/FancyButton.svelte b/packages/bbui/src/FancyForm/FancyButton.svelte
new file mode 100644
index 0000000000..09615df8fa
--- /dev/null
+++ b/packages/bbui/src/FancyForm/FancyButton.svelte
@@ -0,0 +1,29 @@
+
+
+
+ {#if icon}
+ {#if icon.includes("/")}
+
+ {:else}
+
+ {/if}
+ {/if}
+
+
+
+
+
+
diff --git a/packages/bbui/src/FancyForm/FancyField.svelte b/packages/bbui/src/FancyForm/FancyField.svelte
new file mode 100644
index 0000000000..85f07f2a31
--- /dev/null
+++ b/packages/bbui/src/FancyForm/FancyField.svelte
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+ {#if error}
+
+ {error}
+
+ {/if}
+
+
+
diff --git a/packages/bbui/src/FancyForm/FancyForm.svelte b/packages/bbui/src/FancyForm/FancyForm.svelte
new file mode 100644
index 0000000000..f197d81118
--- /dev/null
+++ b/packages/bbui/src/FancyForm/FancyForm.svelte
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
diff --git a/packages/bbui/src/FancyForm/FancyInput.svelte b/packages/bbui/src/FancyForm/FancyInput.svelte
new file mode 100644
index 0000000000..1e46f96b1b
--- /dev/null
+++ b/packages/bbui/src/FancyForm/FancyInput.svelte
@@ -0,0 +1,99 @@
+
+
+
+ {#if label}
+
+ {label}
+
+ {/if}
+ (focused = true)}
+ on:blur={() => (focused = false)}
+ class:placeholder
+ />
+
+
+
diff --git a/packages/bbui/src/FancyForm/index.js b/packages/bbui/src/FancyForm/index.js
new file mode 100644
index 0000000000..4b8e099b80
--- /dev/null
+++ b/packages/bbui/src/FancyForm/index.js
@@ -0,0 +1,3 @@
+export { default as FancyInput } from "./FancyInput.svelte"
+export { default as FancyButton } from "./FancyButton.svelte"
+export { default as FancyForm } from "./FancyForm.svelte"
diff --git a/packages/bbui/src/index.js b/packages/bbui/src/index.js
index 601c4dcbca..3de0bc2f46 100644
--- a/packages/bbui/src/index.js
+++ b/packages/bbui/src/index.js
@@ -101,3 +101,6 @@ export { banner, BANNER_TYPES } from "./Stores/banner"
// Helpers
export * as Helpers from "./helpers"
+
+// Fancy form components
+export * from "./FancyForm"
diff --git a/packages/builder/src/pages/builder/auth/_components/GoogleButton.svelte b/packages/builder/src/pages/builder/auth/_components/GoogleButton.svelte
index 0acaa127cc..3c20192ce2 100644
--- a/packages/builder/src/pages/builder/auth/_components/GoogleButton.svelte
+++ b/packages/builder/src/pages/builder/auth/_components/GoogleButton.svelte
@@ -1,40 +1,30 @@
{#if show}
-
- window.open(`/api/global/auth/${tenantId}/google`, "_blank")}
+ {
+ window.open(`/api/global/auth/${tenantId}/google`, "_blank")
+ }}
+ icon={GoogleLogo}
>
-
-
-
Sign in with Google
-
-
+ Log in with Google
+
+ {
+ window.open(`/api/global/auth/${tenantId}/google`, "_blank")
+ }}
+ icon={GoogleLogo}
+ >
+ Log in with Google
+
{/if}
-
-
diff --git a/packages/builder/src/pages/builder/auth/login.svelte b/packages/builder/src/pages/builder/auth/login.svelte
index d8633a4fbc..5a54cafcd5 100644
--- a/packages/builder/src/pages/builder/auth/login.svelte
+++ b/packages/builder/src/pages/builder/auth/login.svelte
@@ -5,11 +5,12 @@
Button,
Divider,
Heading,
- Input,
Layout,
notifications,
Link,
} from "@budibase/bbui"
+ import { FancyInput, FancyForm } from "@budibase/bbui"
+ import { TestimonialPage } from "@budibase/frontend-core"
import { goto } from "@roxi/routify"
import { auth, organisation, oidc, admin } from "stores/portal"
import GoogleButton from "./_components/GoogleButton.svelte"
@@ -20,12 +21,16 @@
let username = ""
let password = ""
let loaded = false
+ let form
$: company = $organisation.company || "Budibase"
$: multiTenancyEnabled = $admin.multiTenancy
$: cloud = $admin.cloud
async function login() {
+ if (!form.validate()) {
+ return
+ }
try {
await auth.login({
username: username.trim(),
@@ -57,60 +62,78 @@
-
+ {#if cloud}
+
+ By using Budibase Cloud
+
+ you are agreeing to our
+
+ License Agreement
+
+
+ {/if}
+
+
diff --git a/packages/builder/src/stores/portal/environment.js b/packages/builder/src/stores/portal/environment.js
index ba33f22e6f..fa06242cf5 100644
--- a/packages/builder/src/stores/portal/environment.js
+++ b/packages/builder/src/stores/portal/environment.js
@@ -26,6 +26,7 @@ export function createEnvironmentStore() {
async function updateVariable(data) {
await API.updateEnvironmentVariable(data)
}
+
return {
subscribe,
loadVariables,
diff --git a/packages/builder/src/stores/portal/licensing.js b/packages/builder/src/stores/portal/licensing.js
index 59a1622c9f..f6e96b1dcd 100644
--- a/packages/builder/src/stores/portal/licensing.js
+++ b/packages/builder/src/stores/portal/licensing.js
@@ -60,7 +60,9 @@ export const createLicensingStore = () => {
const backupsEnabled = license.features.includes(
Constants.Features.BACKUPS
)
-
+ let environmentVariablesEnabled = license.features.includes(
+ Constants.Features.ENVIRONMENT_VARIABLES
+ )
store.update(state => {
return {
...state,
@@ -68,6 +70,7 @@ export const createLicensingStore = () => {
isFreePlan,
groupsEnabled,
backupsEnabled,
+ environmentVariablesEnabled,
}
})
},
From e29a828abc2d17aaa08cf8c35cd8dfa00da62737 Mon Sep 17 00:00:00 2001
From: Peter Clement
Date: Tue, 17 Jan 2023 10:51:26 +0000
Subject: [PATCH 102/207] add export modal warning
---
.../builder/src/components/start/ExportAppModal.svelte | 5 ++++-
.../pages/builder/portal/settings/environment/index.svelte | 7 ++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/packages/builder/src/components/start/ExportAppModal.svelte b/packages/builder/src/components/start/ExportAppModal.svelte
index 25c0606c14..948416b192 100644
--- a/packages/builder/src/components/start/ExportAppModal.svelte
+++ b/packages/builder/src/components/start/ExportAppModal.svelte
@@ -1,5 +1,5 @@
+
Apps can be exported with or without data that is within internal tables -
select this below.Add Variable
{:else}
-