diff --git a/theme/src/main/resources/theme/openremote/login/login-otp.ftl b/theme/src/main/resources/theme/openremote/login/login-otp.ftl new file mode 100644 index 0000000..7e1eff5 --- /dev/null +++ b/theme/src/main/resources/theme/openremote/login/login-otp.ftl @@ -0,0 +1,63 @@ +<#import "template.ftl" as layout> +<@layout.registrationLayout displayMessage=!messagesPerField.existsError('totp'); section> + <#if section="header"> + ${msg("doLogIn")} + <#elseif section="form"> +
+ <#if otpLogin.userOtpCredentials?size gt 1> +
+
+ +
+ <#list otpLogin.userOtpCredentials as otpCredential> +
+ checked="checked"> + +
+ +
+
+
+ + +
+
+ +
+ +
+ + + <#if messagesPerField.existsError('totp')> + + ${kcSanitize(messagesPerField.get('totp'))?no_esc} + + +
+
+ +
+
+
+
+
+ +
+ +
+
+
+ + \ No newline at end of file diff --git a/theme/src/main/resources/theme/openremote/login/messages/messages_en.properties b/theme/src/main/resources/theme/openremote/login/messages/messages_en.properties index 3267f9b..37eba04 100644 --- a/theme/src/main/resources/theme/openremote/login/messages/messages_en.properties +++ b/theme/src/main/resources/theme/openremote/login/messages/messages_en.properties @@ -2,4 +2,5 @@ backToLogin=Back to login applicationName=OpenRemote logoUrl=https://openremote.io registerTitle=Registration -registerTitleHtml=Registration \ No newline at end of file +registerTitleHtml=Registration +select2faDevice=Select your 2FA device \ No newline at end of file diff --git a/theme/src/main/resources/theme/openremote/login/resources/css/styles.css b/theme/src/main/resources/theme/openremote/login/resources/css/styles.css index f12eea3..7ae2daa 100644 --- a/theme/src/main/resources/theme/openremote/login/resources/css/styles.css +++ b/theme/src/main/resources/theme/openremote/login/resources/css/styles.css @@ -112,7 +112,25 @@ i.material-icons { background-color: var(--app-primary-color) !important; } +#kc-otp-credential-box { + display: flex; + flex-direction: column; + gap: 4px; + margin: 12px; +} + +#kc-otp-credential-box div { + display: flex; + align-items: center; + gap: 4px; +} + [type="checkbox"]:checked + span:not(.lever):before { border-right: 2px solid var(--app-primary-color) !important; border-bottom: 2px solid var(--app-primary-color) !important; +} + +[type="radio"]:not(:checked), [type="radio"]:checked { + position: relative; + opacity: 1; } \ No newline at end of file