diff --git a/packages/builder/src/pages/builder/auth/forgot.svelte b/packages/builder/src/pages/builder/auth/forgot.svelte index c4452a0f68..85301b3f02 100644 --- a/packages/builder/src/pages/builder/auth/forgot.svelte +++ b/packages/builder/src/pages/builder/auth/forgot.svelte @@ -9,6 +9,7 @@ } from "@budibase/bbui" import { organisation, auth } from "stores/portal" import Logo from "assets/bb-emblem.svg" + import { onMount } from "svelte" let email = "" @@ -20,6 +21,10 @@ notifications.error("Unable to send reset password link") } } + + onMount(async () => { + await organisation.init() + })
diff --git a/packages/builder/src/pages/builder/auth/login.svelte b/packages/builder/src/pages/builder/auth/login.svelte index 1669a5577b..9fb984c73e 100644 --- a/packages/builder/src/pages/builder/auth/login.svelte +++ b/packages/builder/src/pages/builder/auth/login.svelte @@ -10,13 +10,16 @@ notifications, } from "@budibase/bbui" import { goto, params } from "@roxi/routify" - import { auth } from "stores/portal" + import { auth, organisation } from "stores/portal" import GoogleButton from "./_components/GoogleButton.svelte" import Logo from "assets/bb-emblem.svg" + import { onMount } from "svelte" let username = "" let password = "" + $: company = $organisation.company || "Budibase" + async function login() { try { await auth.login({ @@ -43,6 +46,10 @@ function handleKeydown(evt) { if (evt.key === "Enter") login() } + + onMount(async () => { + await organisation.init() + }) @@ -50,8 +57,8 @@
- logo - Sign in to Budibase + logo + Sign in to {company} @@ -66,7 +73,7 @@ /> - + $goto("./forgot")}> Forgot password? diff --git a/packages/builder/src/pages/builder/auth/reset.svelte b/packages/builder/src/pages/builder/auth/reset.svelte index aed2034aff..e38a5d8b24 100644 --- a/packages/builder/src/pages/builder/auth/reset.svelte +++ b/packages/builder/src/pages/builder/auth/reset.svelte @@ -2,8 +2,9 @@ import { Body, Button, Heading, Layout, notifications } from "@budibase/bbui" import { goto, params } from "@roxi/routify" import PasswordRepeatInput from "components/common/users/PasswordRepeatInput.svelte" - import { auth } from "stores/portal" + import { auth, organisation } from "stores/portal" import Logo from "assets/bb-emblem.svg" + import { onMount } from "svelte" const resetCode = $params["?code"] let password, error @@ -28,13 +29,17 @@ notifications.error("Unable to reset password") } } + + onMount(async () => { + await organisation.init() + })