From 1080708ed57f93332f5473de3f4aa5cfec2454bf Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 18 May 2021 12:34:21 +0100 Subject: [PATCH] Adding in all the other routes needed for forgotten password flow. --- packages/bbui/src/Typography/Heading.svelte | 6 ++- .../src/components/login/ForgotForm.svelte | 51 ++++++++++++++++++ .../src/components/login/GoogleButton.svelte | 34 ++++++++---- .../src/components/login/LoginForm.svelte | 10 ++-- .../src/components/login/ResetForm.svelte | 53 +++++++++++++++++++ .../builder/src/pages/builder/_layout.svelte | 4 +- .../src/pages/builder/auth/forgot.svelte | 5 ++ .../src/pages/builder/auth/reset.svelte | 5 ++ 8 files changed, 149 insertions(+), 19 deletions(-) create mode 100644 packages/builder/src/components/login/ForgotForm.svelte create mode 100644 packages/builder/src/components/login/ResetForm.svelte create mode 100644 packages/builder/src/pages/builder/auth/forgot.svelte create mode 100644 packages/builder/src/pages/builder/auth/reset.svelte diff --git a/packages/bbui/src/Typography/Heading.svelte b/packages/bbui/src/Typography/Heading.svelte index 6e0c158708..4d0814a22d 100644 --- a/packages/bbui/src/Typography/Heading.svelte +++ b/packages/bbui/src/Typography/Heading.svelte @@ -3,8 +3,12 @@ // Sizes export let size = "M" + export let textAlign = "left" + export let noPadding = false -

+

diff --git a/packages/builder/src/components/login/ForgotForm.svelte b/packages/builder/src/components/login/ForgotForm.svelte new file mode 100644 index 0000000000..e95660bb63 --- /dev/null +++ b/packages/builder/src/components/login/ForgotForm.svelte @@ -0,0 +1,51 @@ + + +
+
+ + + + + + Forgotten your password? + 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 67aca57df5..9f154df059 100644 --- a/packages/builder/src/components/login/GoogleButton.svelte +++ b/packages/builder/src/components/login/GoogleButton.svelte @@ -1,17 +1,25 @@ - goto("/api/admin/auth/google")}> -
- google icon -
Sign in with Google
-
-
+
+ +
+ google icon +

Sign in with Google

+
+ +
+ diff --git a/packages/builder/src/components/login/LoginForm.svelte b/packages/builder/src/components/login/LoginForm.svelte index 1e6e83111b..92d32a3162 100644 --- a/packages/builder/src/components/login/LoginForm.svelte +++ b/packages/builder/src/components/login/LoginForm.svelte @@ -29,10 +29,6 @@ notifications.error("Invalid credentials") } } - - async function forgot() { - - }
@@ -43,15 +39,15 @@ Sign in to Budibase - + Sign in with email - Forgot password? + $goto("./forgot")}>Forgot password?
@@ -68,7 +64,7 @@ } .main { - width: 260px; + width: 300px; } img { diff --git a/packages/builder/src/components/login/ResetForm.svelte b/packages/builder/src/components/login/ResetForm.svelte new file mode 100644 index 0000000000..45202722a3 --- /dev/null +++ b/packages/builder/src/components/login/ResetForm.svelte @@ -0,0 +1,53 @@ + + +
+
+ + + + + + Reset your password + Please enter the new password you'd like to use. + + + + +
+
+ + diff --git a/packages/builder/src/pages/builder/_layout.svelte b/packages/builder/src/pages/builder/_layout.svelte index b15001b788..dbc89131cb 100644 --- a/packages/builder/src/pages/builder/_layout.svelte +++ b/packages/builder/src/pages/builder/_layout.svelte @@ -1,6 +1,6 @@ + + diff --git a/packages/builder/src/pages/builder/auth/reset.svelte b/packages/builder/src/pages/builder/auth/reset.svelte new file mode 100644 index 0000000000..4cb949921c --- /dev/null +++ b/packages/builder/src/pages/builder/auth/reset.svelte @@ -0,0 +1,5 @@ + + +