From 5585419ec4b1f756e5a0faf0b0c6deaf5e0ef0ee Mon Sep 17 00:00:00 2001 From: ItzNotABug Date: Thu, 15 Aug 2024 13:25:11 +0530 Subject: [PATCH 1/3] update: add a success notification. --- src/routes/console/account/mfa.svelte | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/routes/console/account/mfa.svelte b/src/routes/console/account/mfa.svelte index 5fa0c8d4af..ef64e4293e 100644 --- a/src/routes/console/account/mfa.svelte +++ b/src/routes/console/account/mfa.svelte @@ -7,6 +7,7 @@ import { sdk } from '$lib/stores/sdk'; import { AuthenticatorType, type Models } from '@appwrite.io/console'; import QrFrame from '$lib/images/qr2.svg'; + import { addNotification } from '$lib/stores/notifications'; export let showSetup = false; @@ -28,6 +29,10 @@ await sdk.forConsole.account.updateMfaAuthenticator(AuthenticatorType.Totp, code); await Promise.all([invalidate(Dependencies.ACCOUNT), invalidate(Dependencies.FACTORS)]); showSetup = false; + addNotification({ + type: 'success', + message: 'Authenticator app added successfully' + }); trackEvent(Submit.AccountAuthenticatorUpdate); } catch (e) { error = e.message; From ed9cf7f33db337544f2ef9f92eafcbb9b8e03b4e Mon Sep 17 00:00:00 2001 From: ItzNotABug Date: Fri, 16 Aug 2024 12:56:46 +0530 Subject: [PATCH 2/3] add: totp app status pill, fix alignment. --- src/routes/console/account/updateMfa.svelte | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/routes/console/account/updateMfa.svelte b/src/routes/console/account/updateMfa.svelte index 86e8eccca1..88f52fc4a0 100644 --- a/src/routes/console/account/updateMfa.svelte +++ b/src/routes/console/account/updateMfa.svelte @@ -109,13 +109,18 @@
-
+
-
- Authenticator app - +
+ Authenticator app + {#if $factors.totp} + connected + {/if} +
+ Use an authentication app to generate two-factor authentication codes.
@@ -141,7 +146,7 @@
-
+
@@ -185,7 +190,7 @@
-
+
From b5c9530b622fe3f815fb4a01870aa2bc70cd25d8 Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 16 Aug 2024 14:21:27 +0530 Subject: [PATCH 3/3] update: message copy --- src/routes/console/account/mfa.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/console/account/mfa.svelte b/src/routes/console/account/mfa.svelte index ef64e4293e..b7f4172e93 100644 --- a/src/routes/console/account/mfa.svelte +++ b/src/routes/console/account/mfa.svelte @@ -31,7 +31,7 @@ showSetup = false; addNotification({ type: 'success', - message: 'Authenticator app added successfully' + message: 'Authenticator app connected successfully' }); trackEvent(Submit.AccountAuthenticatorUpdate); } catch (e) {