diff --git a/src/routes/(console)/account/updateEmail.svelte b/src/routes/(console)/account/updateEmail.svelte index cad162c361..44a88322f5 100644 --- a/src/routes/(console)/account/updateEmail.svelte +++ b/src/routes/(console)/account/updateEmail.svelte @@ -25,6 +25,7 @@ type: 'success' }); trackEvent(Submit.AccountUpdateEmail); + emailPassword = null; } catch (error) { addNotification({ message: error.message, diff --git a/src/routes/(console)/project-[region]-[project]/auth/user-[user]/updateStatus.svelte b/src/routes/(console)/project-[region]-[project]/auth/user-[user]/updateStatus.svelte index 229109f948..73f74cbe08 100644 --- a/src/routes/(console)/project-[region]-[project]/auth/user-[user]/updateStatus.svelte +++ b/src/routes/(console)/project-[region]-[project]/auth/user-[user]/updateStatus.svelte @@ -22,9 +22,14 @@ .forProject(page.params.region, page.params.project) .users.updateEmailVerification($user.$id, !$user.emailVerification); await invalidate(Dependencies.USER); + let userLabel: string = '' + + if ($user.name) + userLabel = `for ${$user.name}` + addNotification({ - message: `${$user.name || $user.email || $user.phone || 'The account'} has been ${ - !$user.emailVerification ? 'unverified' : 'verified' + message: `The email ${userLabel} ${ + !$user.emailVerification ? 'is no longer verified' : 'has been verified' }`, type: 'success' }); @@ -44,9 +49,15 @@ .forProject(page.params.region, page.params.project) .users.updatePhoneVerification($user.$id, !$user.phoneVerification); await invalidate(Dependencies.USER); + + let userLabel: string = ''; + + if ($user.name || $user.email) + userLabel = `for ${$user[$user.name ? 'name' : 'email']}`; + addNotification({ - message: `${$user.name || $user.email || $user.phone || 'The account'} has been ${ - $user.phoneVerification ? 'unverified' : 'verified' + message: `The phone ${userLabel} ${ + !$user.phoneVerification ? 'is no longer verified' : 'has been verified' }`, type: 'success' });