From 053af1becb82977cd4f2c0dec4f09e0ac5dc7819 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 19 May 2021 13:18:58 +0100 Subject: [PATCH 1/6] Add modal to let users change their own password, without endpoint for now --- .../_components/ChangePasswordModal.svelte | 21 +++++++++++++++++ .../_components/UpdateUserInfoModal.svelte | 18 ++------------- .../src/pages/builder/apps/index.svelte | 23 +++++++++++++++---- 3 files changed, 42 insertions(+), 20 deletions(-) create mode 100644 packages/builder/src/pages/builder/apps/_components/ChangePasswordModal.svelte diff --git a/packages/builder/src/pages/builder/apps/_components/ChangePasswordModal.svelte b/packages/builder/src/pages/builder/apps/_components/ChangePasswordModal.svelte new file mode 100644 index 0000000000..d1f21d6b5b --- /dev/null +++ b/packages/builder/src/pages/builder/apps/_components/ChangePasswordModal.svelte @@ -0,0 +1,21 @@ + + + + Enter your new password below. + + diff --git a/packages/builder/src/pages/builder/apps/_components/UpdateUserInfoModal.svelte b/packages/builder/src/pages/builder/apps/_components/UpdateUserInfoModal.svelte index e54c3c719f..21d6797e1f 100644 --- a/packages/builder/src/pages/builder/apps/_components/UpdateUserInfoModal.svelte +++ b/packages/builder/src/pages/builder/apps/_components/UpdateUserInfoModal.svelte @@ -1,9 +1,7 @@ diff --git a/packages/builder/src/pages/builder/apps/index.svelte b/packages/builder/src/pages/builder/apps/index.svelte index 7d9c8b93b4..608e02f449 100644 --- a/packages/builder/src/pages/builder/apps/index.svelte +++ b/packages/builder/src/pages/builder/apps/index.svelte @@ -19,16 +19,19 @@ import { AppStatus } from "constants" import { gradient } from "actions" import UpdateUserInfoModal from "./_components/UpdateUserInfoModal.svelte" + import ChangePasswordModal from "./_components/ChangePasswordModal.svelte" let loaded = false let userInfoModal - let userPasswordModal + let changePasswordModal onMount(async () => { await organisation.init() await apps.load(AppStatus.DEV) loaded = true }) + + $: console.log($auth.user) {#if loaded} @@ -56,7 +59,12 @@ userInfoModal.show()}> Update user information - Update password + changePasswordModal.show()} + > + Update password + $goto("../portal")} @@ -76,7 +84,11 @@
GROUP {#if $auth.user?.builder?.global} - + alert("Navigate to portal group page.")} + /> {/if}
{#each $apps as app, idx (app.appId)} @@ -100,6 +112,9 @@ + + + {/if}