Skip to content

Commit c07e71b

Browse files
committed
feat: update login template to conditionally display password form and Linuxdo option based on secure settings
1 parent f25705e commit c07e71b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tmpl.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,7 @@ const loginTemplate = `<!DOCTYPE html>
635635
<div class="col-md-4">
636636
<div class="card shadow">
637637
<div class="card-body">
638+
{{if ne .Secure "false"}}
638639
<h3 class="card-title mb-4">请输入访问密码</h3>
639640
<form method="POST">
640641
<div class="mb-3">
@@ -646,8 +647,9 @@ const loginTemplate = `<!DOCTYPE html>
646647
</div>
647648
<button type="submit" class="btn btn-primary w-100">登录</button>
648649
</form>
650+
{{end}}
649651
{{if ne .Linuxdo "false"}}
650-
OR
652+
{{if ne .Secure "false"}}OR{{end}}
651653
<a href="/oauth2/linxdo" class="btn btn-primary w-100" style="background-color: #4cad50;border: solid;">
652654
<svg width="27" height="27" viewBox="0 0 120 120" xmlns="http://www.w3.org/2000/svg">
653655
<clipPath id="a"><circle cx="60" cy="60" r="47"/></clipPath>

0 commit comments

Comments
 (0)