Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/routes/(console)/account/updateEmail.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
type: 'success'
});
trackEvent(Submit.AccountUpdateEmail);
emailPassword = null;
} catch (error) {
addNotification({
message: error.message,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
});
Expand All @@ -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'
});
Expand Down