Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Kotahi
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
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
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Omo Oaiya
Kotahi
Commits
3c98128e
Commit
3c98128e
authored
5 years ago
by
Jure
Browse files
Options
Downloads
Patches
Plain Diff
feat: add password reset
parent
09ff24a7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/routes.js
+4
-5
4 additions, 5 deletions
app/routes.js
config/components.json
+2
-1
2 additions, 1 deletion
config/components.json
with
6 additions
and
6 deletions
app/routes.js
+
4
−
5
View file @
3c98128e
import
React
from
'
react
'
import
React
from
'
react
'
import
{
withProps
}
from
'
recompose
'
import
{
Route
,
Switch
,
Redirect
}
from
'
react-router-dom
'
import
{
Route
,
Switch
,
Redirect
}
from
'
react-router-dom
'
import
Login
from
'
pubsweet-component-login
'
import
Login
from
'
pubsweet-component-login
'
import
Signup
from
'
pubsweet-component-signup
'
import
Signup
from
'
pubsweet-component-signup
'
import
PasswordReset
from
'
@pubsweet/component-password-reset-client
'
// import {
// import {
// FindReviewersPage,
// FindReviewersPage,
...
@@ -23,8 +23,6 @@ import FormBuilderPage from 'pubsweet-component-xpub-formbuilder/src/components/
...
@@ -23,8 +23,6 @@ import FormBuilderPage from 'pubsweet-component-xpub-formbuilder/src/components/
// import SimpleFormBuilderPage from 'pubsweet-component-xpub-simple-formbuilder/src/components/SimpleFormBuilderPage'
// import SimpleFormBuilderPage from 'pubsweet-component-xpub-simple-formbuilder/src/components/SimpleFormBuilderPage'
import
App
from
'
./components/App
'
import
App
from
'
./components/App
'
const
LoginPage
=
withProps
({
passwordReset
:
false
})(
Login
)
const
createReturnUrl
=
({
pathname
,
search
=
''
})
=>
pathname
+
search
const
createReturnUrl
=
({
pathname
,
search
=
''
})
=>
pathname
+
search
const
loginUrl
=
location
=>
`/login?next=
${
createReturnUrl
(
location
)}
`
const
loginUrl
=
location
=>
`/login?next=
${
createReturnUrl
(
location
)}
`
...
@@ -101,10 +99,11 @@ export default (
...
@@ -101,10 +99,11 @@ export default (
/> */
}
/> */
}
<
Route
component
=
{
Signup
}
exact
path
=
"
/signup
"
/>
<
Route
component
=
{
Signup
}
exact
path
=
"
/signup
"
/>
<
Route
component
=
{
LoginPage
}
exact
path
=
"
/login
"
/>
<
Route
component
=
{
Login
}
path
=
"
/login
"
/>
<
Route
component
=
{
PasswordReset
}
path
=
"
/password-reset
"
/>
<
PrivateRoute
component
=
{
UsersManager
}
path
=
"
/users
"
/>
<
PrivateRoute
component
=
{
UsersManager
}
path
=
"
/users
"
/>
<
PrivateRoute
component
=
{
Dashboard
}
path
=
"
*
"
/>
{
/*
<PrivateRoute component={Dashboard} path="*" />
*/
}
<
/Switch
>
<
/Switch
>
{
/* <Redirect from="/" to="/dashboard"/> */
}
{
/* <Redirect from="/" to="/dashboard"/> */
}
<
/App
>
<
/App
>
...
...
This diff is collapsed.
Click to expand it.
config/components.json
+
2
−
1
View file @
3c98128e
...
@@ -13,5 +13,6 @@
...
@@ -13,5 +13,6 @@
"server/review/src/"
,
"server/review/src/"
,
"server/file/src/"
,
"server/file/src/"
,
"server/formbuilder/src/"
,
"server/formbuilder/src/"
,
"@pubsweet/job-xsweet"
"@pubsweet/job-xsweet"
,
"@pubsweet/component-password-reset-server"
]
]
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