From 3641ee5e2ce64ff2e3e41c8574f93ce4d0cc669f Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 17 May 2021 13:47:23 +0100 Subject: [PATCH 01/13] Work in progress, moving login form around a bit. --- packages/builder/assets/google-logo.png | Bin 0 -> 1771 bytes .../src/components/login/GoogleButton.svelte | 41 ++++++++++++++ .../src/components/login/LoginForm.svelte | 53 ++++++++++++++---- 3 files changed, 84 insertions(+), 10 deletions(-) create mode 100644 packages/builder/assets/google-logo.png create mode 100644 packages/builder/src/components/login/GoogleButton.svelte diff --git a/packages/builder/assets/google-logo.png b/packages/builder/assets/google-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..3f52a66ae9619e0bb383d220a449a327560d6135 GIT binary patch literal 1771 zcmV;P)`k0=zBfB zkn`M?`8j|fxCf@%+vGftwhhaK7Gne>{zi-5z}97RWX_k##(G@`1A@Tfqv4ShjOlj= zphhI~r^tOhfI^{jV1Q#XcL$;QC}b6l2+c-HubidYT6F>pC`u8`hnFI{1d(k#Oy=nf z2%sEvXhSsJ#(oz_YD$zwS~C=f)gv(~{{UAocEa z?)X43@~=l}TUX8p0B{uyZ~+ni%za=O`K8x{#=kx6((O;w)o{2GPc>YDyoUzoJujL3 zJ<`d{0Wg_k^(ZimGW6;8HJ{$r!qx{+C^!rT6hTD224SirJAQM->O6gz+s~FjXFl}M z3Fh{a$o3Dip^n>Ns>uanXhxYlNS!}?Ivm$@E=J>BfXT9T^uc8L26e#0cS^MoISy2U zvrOoNDN&g2gUg#KRbV2eFMTi|rMeG}Ehbcg6TYVlj(!UP*L`5$bfrpg%m;MA3Ey)9 z?3#qD1V_9`7o0Yj6W}W`tbqq{0t^SIo^?u}i&PCx_<=4s>P=379pdqxH7t3gD0^1n z;h&`%T((eqTRe)eXAbawgVY-t<~2z{VA=%d z)R6Sg=N&wST1~vB(3hrp4u#IUb0*hCo8Z&o7=185L&>~Nn-cWiXg7oVv@reLZE89i zwWDp50fYSrcdRM_#jp{7h5ub2S2M_aXy!$2)lMV+R2ahHwK^&T03bhVX$yURxpzOP zQk~P9Ke6k@)R;X8hxcR{hVU>=5&J3BmIS|H<~{~`=p?8*R&!bz2Bw~sA&tPrjU>Y3 zQbF+sfB(-0ULSjCroX#wY(ttRv;cth?g}LBq|-9A=fhI0eU#5s$Uw?JZdP7pA?#{# z0_@NjN;ELsd@CZLfk6&tUdBkA6|JCynsZT(sxibo6+(gHtg-pej1JI@YZ;@It-^+^5sS*AMWpQ}yF6 z)&r08yVS0ARj}}KsZcH%!<&vSWIz4R9~!nx@+htOVJW=Hu>gi!wy>zLyNxcG|GBzk z=-!HlPJJ`0NH$*(hlLazX1m`E<1}H=;n@4YE{Qn%O8_G3lKQw=>x9|GqW|g3w?`~E zsnFCSkNAcRSVHQ6`NoK~Vd(D0qrsSFm+_=F=fXyZj+pl)^3hkdpl?l50USuWmpa0G za(rWk_Lkz26bYL<=ye!7nHsjXNha)u#g-W@1=fK}w5&axb%mhFZd*=E0g7K4d8Z!K zWM+hK$QPCB#DZyz#2t!!MkRQ6#R= z^$$I0!#dncgO+aCO|l%uDdd&x+V+6SP#% zcP5-0!J=)b*Tk{B85RKx=S6LS!b=5Suq)PzwfBB-NiVn;+zWo>_8%1)ADpoFWwrnS N002ovPDHLkV1fkhT8IDu literal 0 HcmV?d00001 diff --git a/packages/builder/src/components/login/GoogleButton.svelte b/packages/builder/src/components/login/GoogleButton.svelte new file mode 100644 index 0000000000..ff04e82ebe --- /dev/null +++ b/packages/builder/src/components/login/GoogleButton.svelte @@ -0,0 +1,41 @@ + + +
+ +
+ 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 f6f4f314c8..2eecbe3078 100644 --- a/packages/builder/src/components/login/LoginForm.svelte +++ b/packages/builder/src/components/login/LoginForm.svelte @@ -2,11 +2,13 @@ import { goto } from "@roxi/routify" import { notifications, - Link, Input, Modal, ModalContent, + Button, + Divider, } from "@budibase/bbui" + import GoogleButton from "./GoogleButton.svelte" import { auth } from "stores/backend" let username = "" @@ -25,35 +27,66 @@ notifications.error("Invalid credentials") } } + + async function forgot() { + + } - From 43899cae684c75269aa516394a1c05683f351a74 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 17 May 2021 16:48:26 +0100 Subject: [PATCH 03/13] Adding login form from designs. --- .../src/components/login/GoogleButton.svelte | 16 ++--- .../src/components/login/LoginForm.svelte | 66 ++++++++++++------- 2 files changed, 49 insertions(+), 33 deletions(-) diff --git a/packages/builder/src/components/login/GoogleButton.svelte b/packages/builder/src/components/login/GoogleButton.svelte index d6396cb267..ef2c5ce81b 100644 --- a/packages/builder/src/components/login/GoogleButton.svelte +++ b/packages/builder/src/components/login/GoogleButton.svelte @@ -14,25 +14,24 @@ diff --git a/packages/builder/src/components/login/LoginForm.svelte b/packages/builder/src/components/login/LoginForm.svelte index 7e9b2d3dd8..2435896fcd 100644 --- a/packages/builder/src/components/login/LoginForm.svelte +++ b/packages/builder/src/components/login/LoginForm.svelte @@ -1,15 +1,16 @@ - - + From 724593f3410727353477e844c9590bff7ea5b2b8 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 17 May 2021 17:42:12 +0100 Subject: [PATCH 04/13] Add option to layout to justify items --- packages/bbui/src/Layout/Layout.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/bbui/src/Layout/Layout.svelte b/packages/bbui/src/Layout/Layout.svelte index acd064a16a..504db41133 100644 --- a/packages/bbui/src/Layout/Layout.svelte +++ b/packages/bbui/src/Layout/Layout.svelte @@ -6,10 +6,11 @@ export let gap = "M" export let noGap = false export let alignContent = "normal" + export let justifyItems = "stretch"
Date: Mon, 17 May 2021 17:49:40 +0100 Subject: [PATCH 05/13] Add option for text alignment to Body --- packages/bbui/src/Typography/Body.svelte | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/bbui/src/Typography/Body.svelte b/packages/bbui/src/Typography/Body.svelte index b18400862d..9d4e1e637f 100644 --- a/packages/bbui/src/Typography/Body.svelte +++ b/packages/bbui/src/Typography/Body.svelte @@ -4,9 +4,11 @@ export let size = "M" export let serif = false export let noPadding = false + export let textAlign = "left"

Date: Mon, 17 May 2021 17:51:13 +0100 Subject: [PATCH 06/13] Switching over to use layouts. --- .../src/components/login/LoginForm.svelte | 39 ++++++++++--------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/packages/builder/src/components/login/LoginForm.svelte b/packages/builder/src/components/login/LoginForm.svelte index 2435896fcd..f13988dba2 100644 --- a/packages/builder/src/components/login/LoginForm.svelte +++ b/packages/builder/src/components/login/LoginForm.svelte @@ -8,6 +8,7 @@ ActionButton, Layout, Body, + Heading, } from "@budibase/bbui" import GoogleButton from "./GoogleButton.svelte" import {auth} from "stores/backend" @@ -36,21 +37,23 @@

@@ -65,25 +68,25 @@ } .main { - width: 240px; + width: 260px; + } + + .center { display: flex; flex-direction: column; justify-content: center; align-items: center; } - .main img { + img { width: 48px; } .sso { width: 100%; - margin-bottom: var(--spacing-l); - margin-top: var(--spacing-s); } .login-buttons :global(>*) { - margin-top: var(--spacing-l); width: 100%; } From 1c8dee192a42a00e06bfe361cf119d2b597e2374 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 17 May 2021 18:20:10 +0100 Subject: [PATCH 07/13] Switching everything over to proper layouts and removing any specified margins/padding. --- .../src/components/login/GoogleButton.svelte | 35 +++++-------------- .../src/components/login/LoginForm.svelte | 31 +++++----------- 2 files changed, 16 insertions(+), 50 deletions(-) diff --git a/packages/builder/src/components/login/GoogleButton.svelte b/packages/builder/src/components/login/GoogleButton.svelte index ef2c5ce81b..67aca57df5 100644 --- a/packages/builder/src/components/login/GoogleButton.svelte +++ b/packages/builder/src/components/login/GoogleButton.svelte @@ -1,25 +1,17 @@ -
- -
- google icon -

Sign in with Google

-
- -
+ goto("/api/admin/auth/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 f13988dba2..1e6e83111b 100644 --- a/packages/builder/src/components/login/LoginForm.svelte +++ b/packages/builder/src/components/login/LoginForm.svelte @@ -1,5 +1,5 @@ -

+

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 @@ + + + + + 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() { - - } @@ -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 @@ + + + + + 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 @@ + + + From 3332e56842cd319c77c5999053536f4ba60bf553 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 18 May 2021 15:08:57 +0100 Subject: [PATCH 09/13] 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 6013cfd8ed61c45cfd11824b0b8d8ae29337a7d6 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 18 May 2021 15:09:04 +0100 Subject: [PATCH 10/13] 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 @@ -