Skip to content

Commit b1f91c1

Browse files
committed
ref(totp): restart login link
- make the instruction numbered list on configure totp
1 parent b79481a commit b1f91c1

5 files changed

Lines changed: 22 additions & 20 deletions

File tree

theme/keywind/login/components/button/icon.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<#macro kw component="span" rest...>
22
<${component}
3-
class="absolute left-0 ml-3 text-lg"
3+
class="ml-3 text-lg text-primary-600"
44
<#list rest as attrName, attrValue>
55
${attrName}="${attrValue}"
66
</#list>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<#macro kw>
22
<#compress>
3-
${msg("authenticatorCode")}
3+
${msg("authenticatorCode")} *
44
</#compress>
55
</#macro>

theme/keywind/login/components/layout/username.ftl

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44

55
<#macro kw>
66
<#nested "show-username">
7-
<div class="mb-4">
8-
<div class="font-bold mb-2 text-center">${auth.attemptedUsername}</div>
9-
<@buttonPrimary.kw component="a" href="${url.loginRestartFlowUrl}">
10-
<@buttonIcon.kw component="span">
11-
<@iconExternalLink.kw />
12-
</@buttonIcon.kw>
13-
${msg("restartLoginTooltip")}
14-
</@buttonPrimary.kw>
7+
<div class="mb-4 flex items-center justify-center">
8+
<div class="font-bold text-center">${auth.attemptedUsername}</div>
9+
<@buttonIcon.kw
10+
component="a"
11+
href="${url.loginRestartFlowUrl}"
12+
title="${msg('restartLoginTooltip')}"
13+
>
14+
<@iconExternalLink.kw />
15+
</@buttonIcon.kw>
1516
</div>
1617
</#macro>

theme/keywind/login/login-config-totp.ftl

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<#if section="header">
1616
${msg("loginTotpTitle")}
1717
<#elseif section="form">
18-
<ol class="list-none space-y-2">
18+
<ol class="list-decimal pl-4 space-y-2">
1919
<li>
2020
<p>${msg("loginTotpStep1")}</p>
2121

@@ -74,27 +74,28 @@
7474
<@inputPrimary.kw
7575
autocomplete="off"
7676
autofocus=true
77-
invalid=["userLabel"]
78-
name="userLabel"
77+
invalid=["totp"]
78+
name="totp"
7979
type="text"
8080
id="totp"
8181
>
82-
<@labelUserDevice.kw />
82+
<@labelTotp.kw />
8383
</@inputPrimary.kw>
84+
<input type="hidden" id="totpSecret" name="totpSecret" value="${totp.totpSecret}" />
85+
<#if mode??><input type="hidden" id="mode" name="mode" value="${mode}"/></#if>
8486
</div>
87+
8588
<div>
8689
<@inputPrimary.kw
8790
autocomplete="off"
8891
autofocus=true
89-
invalid=["totp"]
90-
name="totp"
92+
invalid=["userLabel"]
93+
name="userLabel"
9194
type="text"
9295
id="totp"
9396
>
94-
<@labelTotp.kw />
97+
<@labelUserDevice.kw />
9598
</@inputPrimary.kw>
96-
<input type="hidden" id="totpSecret" name="totpSecret" value="${totp.totpSecret}" />
97-
<#if mode??><input type="hidden" id="mode" name="mode" value="${mode}"/></#if>
9899
</div>
99100

100101
<#if isAppInitiatedAction??>

theme/keywind/login/resources/dist/index.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)