Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xpub-epmc
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Literature-services
public-projects
xpub-epmc
Commits
9081e352
Commit
9081e352
authored
6 years ago
by
MoSelim
Browse files
Options
Downloads
Patches
Plain Diff
#180
parent
a1158b69
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!60
Dev
,
!33
Shared data model
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/components/login/Login.jsx
+15
-3
15 additions, 3 deletions
app/components/login/Login.jsx
server/xpub-server/entities/user/resolvers.js
+1
-1
1 addition, 1 deletion
server/xpub-server/entities/user/resolvers.js
with
16 additions
and
4 deletions
app/components/login/Login.jsx
+
15
−
3
View file @
9081e352
...
...
@@ -33,6 +33,16 @@ const PasswordField = styled.div`
position: relative;
max-width: 500px;
`
const
Container
=
styled
(
CenteredColumn
)
`
margin: 0 0;
max-width: 350px;
.login-error {
font-size: 18px;
margin: 10px 0 10px 0;
width: inherit;
}
`
const
EmailInput
=
props
=>
<
TextField
label
=
"Email address"
{
...
props
.
field
}
/>
const
PasswordInput
=
props
=>
(
<
TextField
label
=
"Password"
{
...
props
.
field
}
type
=
"password"
/>
...
...
@@ -66,8 +76,10 @@ class Login extends React.Component {
return
(
<
Page
>
<
H1
>
Sign in with your Europe PMC plus account
</
H1
>
<
CenteredColumn
small
style
=
{
{
margin
:
'
0 0
'
}
}
>
{
!
isEmpty
(
errors
)
&&
<
ErrorText
>
{
errors
}
</
ErrorText
>
}
<
Container
medium
>
{
!
isEmpty
(
errors
)
&&
(
<
ErrorText
className
=
"login-error"
>
{
errors
}
</
ErrorText
>
)
}
<
form
onSubmit
=
{
handleSubmit
}
>
<
Field
component
=
{
EmailInput
}
name
=
"email"
/>
<
PasswordField
>
...
...
@@ -88,7 +100,7 @@ class Login extends React.Component {
Login
</
Button
>
</
form
>
</
C
e
nt
eredColumn
>
</
C
o
nt
ainer
>
{
signup
&&
(
<
Signup
>
<
span
>
I don’t have a Europe PMC Plus account.
</
span
>
...
...
This diff is collapsed.
Click to expand it.
server/xpub-server/entities/user/resolvers.js
+
1
−
1
View file @
9081e352
...
...
@@ -92,7 +92,7 @@ const resolvers = {
user
=
await
User
.
validateUser
(
input
.
email
,
input
.
password
)
}
catch
(
error
)
{
logger
.
error
(
error
)
throw
new
Error
(
'
I
ncorrect email or password
'
)
throw
new
Error
(
'
You’ve entered an i
ncorrect email
address
or password
'
)
}
logger
.
debug
(
'
user:
'
,
user
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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