aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorJakobDev <jakobdev@gmx.de>2023-10-11 22:12:54 +0200
committerGitHub <noreply@github.com>2023-10-11 20:12:54 +0000
commit328da56a28b9dd436c8ca4c961e4e10f3517c4b1 (patch)
tree2cd6cdb1a59342f0091a4f952aace9a00ae10d72 /templates
parent1d155a43adfb97e486c1378eef682b1912132005 (diff)
downloadgitea-328da56a28b9dd436c8ca4c961e4e10f3517c4b1.tar.gz
gitea-328da56a28b9dd436c8ca4c961e4e10f3517c4b1.zip
Don't show Link to TOTP if not set up (#27585)
Diffstat (limited to 'templates')
-rw-r--r--templates/user/auth/webauthn.tmpl8
1 files changed, 5 insertions, 3 deletions
diff --git a/templates/user/auth/webauthn.tmpl b/templates/user/auth/webauthn.tmpl
index f738937025..722da02f54 100644
--- a/templates/user/auth/webauthn.tmpl
+++ b/templates/user/auth/webauthn.tmpl
@@ -14,9 +14,11 @@
<div class="is-loading" style="width: 40px; height: 40px"></div>
{{ctx.Locale.Tr "webauthn_press_button"}}
</div>
- <div class="ui attached segment">
- <a href="{{AppSubUrl}}/user/two_factor">{{ctx.Locale.Tr "webauthn_use_twofa"}}</a>
- </div>
+ {{if .HasTwoFactor}}
+ <div class="ui attached segment">
+ <a href="{{AppSubUrl}}/user/two_factor">{{ctx.Locale.Tr "webauthn_use_twofa"}}</a>
+ </div>
+ {{end}}
</div>
</div>
</div>