From 6e858d2bbd3c9caa215340ec343fbbadcc4dd611 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 18 May 2021 15:08:57 +0100 Subject: [PATCH 1/5] Adding repeat password entry component. --- .../common/users/PasswordRepeatInput.svelte | 39 +++++++++++++++++ .../src/pages/builder/invite/index.svelte | 42 ++++--------------- 2 files changed, 46 insertions(+), 35 deletions(-) create mode 100644 packages/builder/src/components/common/users/PasswordRepeatInput.svelte diff --git a/packages/builder/src/components/common/users/PasswordRepeatInput.svelte b/packages/builder/src/components/common/users/PasswordRepeatInput.svelte new file mode 100644 index 0000000000..98128ebd94 --- /dev/null +++ b/packages/builder/src/components/common/users/PasswordRepeatInput.svelte @@ -0,0 +1,39 @@ + + + + + + \ No newline at end of file diff --git a/packages/builder/src/pages/builder/invite/index.svelte b/packages/builder/src/pages/builder/invite/index.svelte index 85316dc008..c6a0f3fa04 100644 --- a/packages/builder/src/pages/builder/invite/index.svelte +++ b/packages/builder/src/pages/builder/invite/index.svelte @@ -3,27 +3,19 @@ Layout, Heading, Body, - Input, Button, notifications, } from "@budibase/bbui" import { goto, params } from "@roxi/routify" - import { createValidationStore, requiredValidator } from "helpers/validation" + import PasswordRepeatInput from "components/common/users/PasswordRepeatInput.svelte" import { users } from "stores/portal" - const [password, passwordError, passwordTouched] = createValidationStore( - "", - requiredValidator - ) - const [repeat, _, repeatTouched] = createValidationStore( - "", - requiredValidator - ) const inviteCode = $params["?code"] + let password, error async function acceptInvite() { try { - const res = await users.acceptInvite(inviteCode, $password) + const res = await users.acceptInvite(inviteCode, password) if (!res) { throw new Error(res.message) } @@ -40,31 +32,14 @@ -
- - Accept Invitation - Please enter a password to setup your user. - -
- - + Accept Invitation + Please enter a password to setup your user. + @@ -87,9 +62,6 @@ justify-content: flex-start; align-items: stretch; } - .center { - text-align: center; - } img { width: 40px; margin: 0 auto; From 46d572a8fcdd4958bc9e6c12d9cb5506040a90fb Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 18 May 2021 15:09:04 +0100 Subject: [PATCH 2/5] Formatting. --- packages/bbui/src/Typography/Heading.svelte | 8 +++-- .../common/users/PasswordRepeatInput.svelte | 36 ++++++++++--------- .../src/components/login/ForgotForm.svelte | 17 ++++----- .../src/components/login/GoogleButton.svelte | 1 - .../src/components/login/LoginForm.svelte | 11 ++++-- .../src/components/login/ResetForm.svelte | 16 +++------ .../src/pages/builder/invite/index.svelte | 17 +++------ 7 files changed, 50 insertions(+), 56 deletions(-) diff --git a/packages/bbui/src/Typography/Heading.svelte b/packages/bbui/src/Typography/Heading.svelte index 4d0814a22d..00951752af 100644 --- a/packages/bbui/src/Typography/Heading.svelte +++ b/packages/bbui/src/Typography/Heading.svelte @@ -7,8 +7,10 @@ export let noPadding = false -

+

diff --git a/packages/builder/src/components/common/users/PasswordRepeatInput.svelte b/packages/builder/src/components/common/users/PasswordRepeatInput.svelte index 98128ebd94..f1cb6bb829 100644 --- a/packages/builder/src/components/common/users/PasswordRepeatInput.svelte +++ b/packages/builder/src/components/common/users/PasswordRepeatInput.svelte @@ -1,9 +1,9 @@ - \ No newline at end of file +
diff --git a/packages/builder/src/components/login/ForgotForm.svelte b/packages/builder/src/components/login/ForgotForm.svelte index e95660bb63..df76f72c2d 100644 --- a/packages/builder/src/components/login/ForgotForm.svelte +++ b/packages/builder/src/components/login/ForgotForm.svelte @@ -1,18 +1,10 @@
@@ -23,7 +15,10 @@ Forgotten your password? - No problem! Just enter your account's email address and we'll send you a link to reset it. + No problem! Just enter your account's email address and we'll send + you a link to reset it. diff --git a/packages/builder/src/components/login/GoogleButton.svelte b/packages/builder/src/components/login/GoogleButton.svelte index 9f154df059..13f3652050 100644 --- a/packages/builder/src/components/login/GoogleButton.svelte +++ b/packages/builder/src/components/login/GoogleButton.svelte @@ -12,7 +12,6 @@
-