Skip to content

Modular logistics and supply chain operating system (LSOS)

improved accoutn verification with ability to manually trigger resend of code

Ronald A. Richardson5a4d6846b534
diff --git a/console/app/controllers/auth/verification.js b/console/app/controllers/auth/verification.js
index 7ed9bd3c..c9998236 100644
--- a/console/app/controllers/auth/verification.js
+++ b/console/app/controllers/auth/verification.js
@@ -127,6 +127,15 @@ export default class AuthVerificationController extends Controller {
);
}
+ /**
+ * Allow user to manually trigger no code received prompt.
+ *
+ * @memberof AuthVerificationController
+ */
+ @action onDidntReceiveCode() {
+ this.stillWaiting = true;
+ }
+
/**
* Validates the input
*
diff --git a/console/app/styles/console.css b/console/app/styles/console.css
index 4def5447..4d152e0b 100644
--- a/console/app/styles/console.css
+++ b/console/app/styles/console.css
@@ -4,6 +4,8 @@
color: rgb(202 138 4);
}
+body[data-theme='dark'] .btn.btn-warning-alert.btn-warning,
+.btn.btn-warning-alert.btn-warning,
.two-fa-enforcement-alert button#two-fa-setup-button.btn.btn-warning,
body[data-theme='dark'] .two-fa-enforcement-alert button#two-fa-setup-button.btn.btn-warning {
background-color: rgb(202 138 4);
diff --git a/console/app/templates/auth/verification.hbs b/console/app/templates/auth/verification.hbs
index f65cfd81..b87c0c70 100644
--- a/console/app/templates/auth/verification.hbs
+++ b/console/app/templates/auth/verification.hbs
@@ -1,9 +1,10 @@
-{{page-title "Account Verification"}}
+{{page-title (t "auth.verification.header-title")}}
+
<div class="bg-white dark:bg-gray-800 py-8 px-4 shadow rounded-lg w-full">
<div class="mb-8">
<img class="mx-auto h-12 w-auto " src="/images/fleetbase-logo-svg.svg" alt={{t "app.name"}}>
<h2 class="mt-6 text-center text-lg font-extrabold text-gray-900 dark:text-white truncate">
- Verify your email address
+ {{t "auth.verification.title"}}
</h2>
</div>
@@ -12,15 +13,16 @@
<FaIcon @icon="shield-check" @size="lg" class="text-blue-900 mr-4" />
</div>
<p class="flex-1 text-sm text-blue-900 dark:text-blue-900">
- <strong>Almost done!</strong><br> Check your email for a verification code.
+ {{t "auth.verification.message-text" htmlSafe=true}}
</p>
</div>
<form class="mt-8 space-y-6" {{on "submit" this.verifyCode}}>
- <InputGroup @type="tel" @name="Verification Code" @value={{this.code}} @helpText="Enter the verification code you received via email." @inputClass="input-lg" {{on "input" this.validateInput}} />
+ <InputGroup @type="tel" @name={{t "auth.verification.verification-input-label"}} @value={{this.code}} @helpText={{t "auth.verification.verification-code-text"}} @inputClass="input-lg" {{on "input" this.validateInput}} />
- <div>
+ <div class="flex flex-row items-center space-x-4">
<Button @icon="check" @iconPrefix="fas" @buttonType="submit" @type="primary" @size="lg" @text="Verify & Continue" @isLoading={{this.isLoading}} @disabled={{this.isNotReadyToSubmit}} @onClick={{this.verifyCode}} />
+ <a href="#" {{on "click" this.onDidntReceiveCode}} class="text-sm text-blue-400 hover:text-blue-300">{{t "auth.verification.didnt-receive-a-code"}}</a>
</div>
{{#if this.stillWaiting}}
@@ -30,14 +32,14 @@
<FaIcon @icon="exclamation-triangle" @size="lg" class="text-yellow-400" />
</div>
<div class="ml-3 flex items-center">
- <span class="text-lg font-extrabold text-yellow-800">Didn't receive an email yet?</span>
+ <span class="text-lg font-extrabold text-yellow-800">{{t "auth.verification.didnt-receive-a-code"}}</span>
</div>
</div>
- <div class="py-3">
- <p class="text-yellow-700">Use alternaitve options below to verify your account.</p>
+ <div class="py-1">
+ <p class="text-yellow-700 text-sm">{{t "auth.verification.not-sent.alternative-choice"}}</p>
<div class="flex items-center mt-3">
- <Button @type="default" class="mr-2" @onClick={{this.resendEmail}}>Resend Email</Button>
- <Button @type="default" @onClick={{this.resendBySms}}>Send by SMS</Button>
+ <Button @buttonType="button" @type="warning" @wrapperClass="mr-2" @onClick={{this.resendEmail}} class="btn-warning-alert">{{t "auth.verification.not-sent.resend-email"}}</Button>
+ <Button @buttonType="button" @type="warning" @onClick={{this.resendBySms}} class="btn-warning-alert">{{t "auth.verification.not-sent.send-by-sms"}}</Button>
</div>
</div>
</div>
diff --git a/console/app/templates/onboard/verify-email.hbs b/console/app/templates/onboard/verify-email.hbs
index 135485f3..f2a4c937 100644
--- a/console/app/templates/onboard/verify-email.hbs
+++ b/console/app/templates/onboard/verify-email.hbs
@@ -1,7 +1,8 @@
-{{page-title "Account Verification"}}
+{{page-title (t "onboard.verify-email.header-title")}}
+
<div class="bg-white dark:bg-gray-800 py-8 px-4 shadow rounded-lg w-full">
<div class="mb-8">
- <img class="mx-auto h-12 w-auto" src="/images/fleetbase-logo-svg.svg" alt={{t "app.name"}}>
+ <img class="mx-auto h-12 w-auto " src="/images/fleetbase-logo-svg.svg" alt={{t "app.name"}}>
<h2 class="mt-6 text-center text-lg font-extrabold text-gray-900 dark:text-white truncate">
{{t "onboard.verify-email.title"}}
</h2>
@@ -12,15 +13,16 @@
<FaIcon @icon="shield-check" @size="lg" class="text-blue-900 mr-4" />
</div>
<p class="flex-1 text-sm text-blue-900 dark:text-blue-900">
- {{t "onboard.verify-email.message-text" htmlSafe=true}}
+ {{t "onboard.verify-email.message-text" htmlSafe=true}}
</p>
</div>
<form class="mt-8 space-y-6" {{on "submit" this.verifyCode}}>
- <InputGroup @type="tel" @name="Verification Code" @value={{this.code}} @helpText={{t "onboard.verify-email.verification-code-text"}} @inputClass="input-lg" {{on "input" this.validateInput}} />
+ <InputGroup @type="tel" @name={{t "onboard.verify-email.verification-input-label"}} @value={{this.code}} @helpText={{t "onboard.verify-email.verification-code-text"}} @inputClass="input-lg" {{on "input" this.validateInput}} />
- <div>
- <Button @icon="check" @iconPrefix="fas" @buttonType="submit" @type="primary" @size="lg" @text={{t "onboard.verify-email.verify-button-text"}} @isLoading={{this.isLoading}} @disabled={{this.isNotReadyToSubmit}} @onClick={{this.verifyCode}} />
+ <div class="flex flex-row items-center space-x-4">
+ <Button @icon="check" @iconPrefix="fas" @buttonType="submit" @type="primary" @size="lg" @text="Verify & Continue" @isLoading={{this.isLoading}} @disabled={{this.isNotReadyToSubmit}} @onClick={{this.verifyCode}} />
+ <a href="#" {{on "click" this.onDidntReceiveCode}} class="text-sm text-blue-400 hover:text-blue-300">{{t "onboard.verify-email.didnt-receive-a-code"}}</a>
</div>
{{#if this.stillWaiting}}
@@ -30,14 +32,14 @@
<FaIcon @icon="exclamation-triangle" @size="lg" class="text-yellow-400" />
</div>
<div class="ml-3 flex items-center">
- <span class="text-lg font-extrabold text-yellow-800">{{t "onboard.verify-email.not-sent.message"}}</span>
+ <span class="text-lg font-extrabold text-yellow-800">{{t "onboard.verify-email.didnt-receive-a-code"}}</span>
</div>
</div>
- <div class="py-3">
- <p class="text-yellow-700">{{t "onboard.verify-email.not-sent.alternative-choice"}}</p>
+ <div class="py-1">
+ <p class="text-yellow-700 text-sm">{{t "onboard.verify-email.not-sent.alternative-choice"}}</p>
<div class="flex items-center mt-3">
- <Button @type="default" class="mr-2" @onClick={{this.resendEmail}}>{{t "onboard.verify-email.not-sent.resent-button-text"}}</Button>
- <Button @type="default" @onClick={{this.resendBySms}}>{{t "onboard.verify-email.not-sent.sms-button-text"}}</Button>
+ <Button @buttonType="button" @type="warning" @wrapperClass="mr-2" @onClick={{this.resendEmail}} class="btn-warning-alert">{{t "onboard.verify-email.not-sent.resend-email"}}</Button>
+ <Button @buttonType="button" @type="warning" @onClick={{this.resendBySms}} class="btn-warning-alert">{{t "onboard.verify-email.not-sent.send-by-sms"}}</Button>
</div>
</div>
</div>
diff --git a/console/translations/en-us.yaml b/console/translations/en-us.yaml
index c94fec98..d3ca0162 100644
--- a/console/translations/en-us.yaml
+++ b/console/translations/en-us.yaml
@@ -51,6 +51,19 @@ component:
message: To enhance the security of your account, your organization requires Two-Factor Authentication (2FA). Enable 2FA in your account settings for an additional layer of protection.
button-text: Setup 2FA
auth:
+ verification:
+ header-title: Account Verification
+ title: Verify your email address
+ message-text: <strong>Almost done!</strong><br> Check your email for a verification code.
+ verification-code-text: Enter the verification code you received via email.
+ verification-input-label: Verification Code
+ verify-button-text: Verify & Continue
+ didnt-receive-a-code: Didn't receive a code yet?
+ not-sent:
+ message: Didn't receive a code yet?
+ alternative-choice: Use alternaitve options below to verify your account.
+ resend-email: Resend Email
+ send-by-sms: Send by SMS
two-fa:
verify-code:
invalid-session-error-notification: Invalid session. Please try again.
@@ -188,15 +201,18 @@ onboard:
confirm-password-help-text: Just to confirm the password you entered above.
continue-button-text: Continue
verify-email:
+ header-title: Account Verification
title: Verify your email address
message-text: <strong>Almost done!</strong><br> Check your email for a verification code.
verification-code-text: Enter the verification code you received via email.
+ verification-input-label: Verification Code
verify-button-text: Verify & Continue
+ didnt-receive-a-code: Didn't receive a code yet?
not-sent:
- message: Didn't receive an email yet?
+ message: Didn't receive a code yet?
alternative-choice: Use alternaitve options below to verify your account.
- resent-button-text: Resend Email
- sms-button-text: Send by SMS
+ resend-email: Resend Email
+ send-by-sms: Send by SMS
install:
installer-header: Installer
failed-message-sent: The install failed! Click the button below to retry the install.