From 758803078093eff4a65f1ef3c70253f4de4ac635 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 6 May 2021 18:02:44 +0100 Subject: [PATCH 01/15] SMTP and template management E2E --- .../builder/src/pages/builder/_layout.svelte | 84 ++++---- .../builder/src/pages/portal/_layout.svelte | 77 ++++--- .../src/pages/portal/email/index.svelte | 193 ++++++++++++++++++ .../src/api/controllers/admin/templates.js | 2 +- .../worker/src/api/routes/admin/configs.js | 2 +- 5 files changed, 277 insertions(+), 81 deletions(-) create mode 100644 packages/builder/src/pages/portal/email/index.svelte diff --git a/packages/builder/src/pages/builder/_layout.svelte b/packages/builder/src/pages/builder/_layout.svelte index 77f8b655f5..8dcf58abb1 100644 --- a/packages/builder/src/pages/builder/_layout.svelte +++ b/packages/builder/src/pages/builder/_layout.svelte @@ -12,55 +12,47 @@ let modal -{#if $auth} - {#if $auth.user} -
-
- - +
+
+ + +
+ +
+
diff --git a/packages/worker/src/api/controllers/admin/templates.js b/packages/worker/src/api/controllers/admin/templates.js index 30c90d50bf..c65aaeea75 100644 --- a/packages/worker/src/api/controllers/admin/templates.js +++ b/packages/worker/src/api/controllers/admin/templates.js @@ -1,5 +1,5 @@ const { generateTemplateID, StaticDatabases } = require("@budibase/auth").db -const { CouchDB } = require("../../../db") +const CouchDB = require("../../../db") const { TemplateMetadata, TemplateBindings, diff --git a/packages/worker/src/api/routes/admin/configs.js b/packages/worker/src/api/routes/admin/configs.js index 9437aec588..38212ea17f 100644 --- a/packages/worker/src/api/routes/admin/configs.js +++ b/packages/worker/src/api/routes/admin/configs.js @@ -17,7 +17,7 @@ function smtpValidation() { auth: Joi.object({ type: Joi.string().valid("login", "oauth2", null), user: Joi.string().required(), - pass: Joi.string().valid("", null), + pass: Joi.string().allow("", null), }).optional(), }).unknown(true) } From 11ce48e1ff91176e6c1bf82f2d36146f187b9cf6 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 10 May 2021 12:06:31 +0100 Subject: [PATCH 02/15] editor styling --- packages/bbui/src/Typography/Body.svelte | 8 ++++++-- .../src/components/integration/QueryEditor.svelte | 4 ++-- packages/builder/src/pages/app/portal/_layout.svelte | 7 ++++++- .../builder/src/pages/app/portal/email/index.svelte | 10 +++++++++- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/packages/bbui/src/Typography/Body.svelte b/packages/bbui/src/Typography/Body.svelte index a45c6278a8..2879e73097 100644 --- a/packages/bbui/src/Typography/Body.svelte +++ b/packages/bbui/src/Typography/Body.svelte @@ -9,12 +9,16 @@

+ class:spectrum-Body--serif={serif}>

diff --git a/packages/builder/src/pages/app/portal/email/index.svelte b/packages/builder/src/pages/app/portal/email/index.svelte index 5ec74a159c..c4c15c5287 100644 --- a/packages/builder/src/pages/app/portal/email/index.svelte +++ b/packages/builder/src/pages/app/portal/email/index.svelte @@ -13,6 +13,7 @@ Select, } from "@budibase/bbui" import { onMount } from "svelte" + import Editor from "components/integration/QueryEditor.svelte" import api from "builderStore/api" const ConfigTypes = { @@ -156,7 +157,14 @@
{#if selectedTemplate} -