Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dex
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hdacloud
dex
Commits
789272a0
Unverified
Commit
789272a0
authored
5 years ago
by
Márk Sági-Kazár
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #1576 from flant/icons-proposal
Pick icons on login screen by connector type instead of ID
parents
664fdf76
058e72ef
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
server/handlers.go
+3
-4
3 additions, 4 deletions
server/handlers.go
server/templates.go
+1
-0
1 addition, 0 deletions
server/templates.go
web/static/main.css
+2
-2
2 additions, 2 deletions
web/static/main.css
web/templates/login.html
+1
-1
1 addition, 1 deletion
web/templates/login.html
with
7 additions
and
7 deletions
server/handlers.go
+
3
−
4
View file @
789272a0
...
@@ -259,16 +259,15 @@ func (s *Server) handleAuthorization(w http.ResponseWriter, r *http.Request) {
...
@@ -259,16 +259,15 @@ func (s *Server) handleAuthorization(w http.ResponseWriter, r *http.Request) {
}
}
connectorInfos
:=
make
([]
connectorInfo
,
len
(
connectors
))
connectorInfos
:=
make
([]
connectorInfo
,
len
(
connectors
))
i
:=
0
for
index
,
conn
:=
range
connectors
{
for
_
,
conn
:=
range
connectors
{
connectorInfos
[
index
]
=
connectorInfo
{
connectorInfos
[
i
]
=
connectorInfo
{
ID
:
conn
.
ID
,
ID
:
conn
.
ID
,
Name
:
conn
.
Name
,
Name
:
conn
.
Name
,
Type
:
conn
.
Type
,
// TODO(ericchiang): Make this pass on r.URL.RawQuery and let something latter
// TODO(ericchiang): Make this pass on r.URL.RawQuery and let something latter
// on create the auth request.
// on create the auth request.
URL
:
s
.
absPath
(
"/auth"
,
conn
.
ID
)
+
"?req="
+
authReq
.
ID
,
URL
:
s
.
absPath
(
"/auth"
,
conn
.
ID
)
+
"?req="
+
authReq
.
ID
,
}
}
i
++
}
}
if
err
:=
s
.
templates
.
login
(
r
,
w
,
connectorInfos
,
r
.
URL
.
Path
);
err
!=
nil
{
if
err
:=
s
.
templates
.
login
(
r
,
w
,
connectorInfos
,
r
.
URL
.
Path
);
err
!=
nil
{
...
...
This diff is collapsed.
Click to expand it.
server/templates.go
+
1
−
0
View file @
789272a0
...
@@ -233,6 +233,7 @@ type connectorInfo struct {
...
@@ -233,6 +233,7 @@ type connectorInfo struct {
ID
string
ID
string
Name
string
Name
string
URL
string
URL
string
Type
string
}
}
type
byName
[]
connectorInfo
type
byName
[]
connectorInfo
...
...
This diff is collapsed.
Click to expand it.
web/static/main.css
+
2
−
2
View file @
789272a0
...
@@ -68,12 +68,12 @@ body {
...
@@ -68,12 +68,12 @@ body {
background-size
:
contain
;
background-size
:
contain
;
}
}
.dex-btn-icon--bitbucket
{
.dex-btn-icon--bitbucket
-cloud
{
background-color
:
#205081
;
background-color
:
#205081
;
background-image
:
url(../static/img/bitbucket-icon.svg)
;
background-image
:
url(../static/img/bitbucket-icon.svg)
;
}
}
.dex-btn-icon--ldap
,
.dex-btn-icon--tectonic-ldap
{
.dex-btn-icon--ldap
{
background-color
:
#84B6EF
;
background-color
:
#84B6EF
;
background-image
:
url(../static/img/ldap-icon.svg)
;
background-image
:
url(../static/img/ldap-icon.svg)
;
}
}
...
...
This diff is collapsed.
Click to expand it.
web/templates/login.html
+
1
−
1
View file @
789272a0
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<div
class=
"theme-form-row"
>
<div
class=
"theme-form-row"
>
<a
href=
"{{ $c.URL }}"
target=
"_self"
>
<a
href=
"{{ $c.URL }}"
target=
"_self"
>
<button
class=
"dex-btn theme-btn-provider"
>
<button
class=
"dex-btn theme-btn-provider"
>
<span
class=
"dex-btn-icon dex-btn-icon--{{ $c.
ID
}}"
></span>
<span
class=
"dex-btn-icon dex-btn-icon--{{ $c.
Type
}}"
></span>
<span
class=
"dex-btn-text"
>
Log in with {{ $c.Name }}
</span>
<span
class=
"dex-btn-text"
>
Log in with {{ $c.Name }}
</span>
</button>
</button>
</a>
</a>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment