Browse Source

fix(ResetPassword): when new code requested, the email that is used is displayed in step 2

Signed-off-by: Jonathan <theflametrooper@gmail.com>
Jonathan 4 years ago
parent
commit
a3e9041d9f
1 changed files with 9 additions and 2 deletions
  1. 9 2
      frontend/src/pages/ResetPassword.vue

+ 9 - 2
frontend/src/pages/ResetPassword.vue

@@ -75,8 +75,12 @@
 						<h2 class="content-box-title">
 							Enter the code sent to your email
 						</h2>
-						<p class="content-box-description">
-							A code has been sent to <strong>email</strong>.
+						<p
+							class="content-box-description"
+							v-if="!this.hasEmailBeenSentAlready"
+						>
+							A code has been sent to
+							<strong>{{ email }}.</strong>
 						</p>
 
 						<p class="content-box-optional-helper">
@@ -243,6 +247,7 @@ export default {
 	data() {
 		return {
 			email: "",
+			hasEmailBeenSentAlready: true,
 			code: "",
 			newPassword: "",
 			newPasswordAgain: "",
@@ -337,6 +342,8 @@ export default {
 					timeout: 8000
 				});
 
+			this.hasEmailBeenSentAlready = false;
+
 			if (this.mode === "set") {
 				return this.socket.emit("users.requestPassword", res => {
 					new Toast({ content: res.message, timeout: 8000 });