Skip to content

Commit a24d2b8

Browse files
committed
Change connector's filter method.
Signed-off-by: leozhang2018 <[email protected]>
1 parent 7d36b8f commit a24d2b8

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

custom-web/templates/login.html

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -66,33 +66,19 @@
6666
<span>第三方登录:</span>
6767
</span>
6868
{{ range $c := .Connectors }}
69-
{{ if and (ne $c.Name "Email") (eq $c.Type "github") }}
69+
{{ if and (ne $c.Name "Email") (ne $c.Type "oauth") (ne $c.Type "ldap") (ne $c.Type "github") }}
7070
<a href="{{ $c.URL }}">
7171
<span class="login-button-show">
72-
<i class="iconfont icon{{ $c.Type }}"></i>
73-
</span>
74-
</a>
75-
{{ end }}
76-
{{ if and (ne $c.Name "Email") (eq $c.Type "oauth") }}
77-
<a href="{{ $c.URL }}">
78-
<span class="login-button-show">
79-
<i class="iconfont icon{{ $c.Type }}"></i>
72+
<i class="iconfont iconotherauth"></i>
8073
</span>
8174
</a>
82-
{{ end }}
83-
{{ if and (ne $c.Name "Email") (eq $c.Type "ldap") }}
75+
{{ else if (ne $c.Name "Email")}}
8476
<a href="{{ $c.URL }}">
8577
<span class="login-button-show">
8678
<i class="iconfont icon{{ $c.Type }}"></i>
8779
</span>
8880
</a>
8981
{{ end }}
90-
{{ else }}
91-
<a href="{{ $c.URL }}">
92-
<span class="login-button-show">
93-
<i class="iconfont iconotherauth"></i>
94-
</span>
95-
</a>
9682
{{ end }}
9783
<span class="divide">|</span>
9884
<a href="/signin?findPassword=true">

0 commit comments

Comments
 (0)