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
0d1130ef
Commit
0d1130ef
authored
6 years ago
by
Giannis Kopanas
Browse files
Options
Downloads
Patches
Plain Diff
disable links with pointer-events
parent
fb70f079
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/components/App.js
+16
-2
16 additions, 2 deletions
app/components/App.js
config/default.js
+3
-1
3 additions, 1 deletion
config/default.js
with
19 additions
and
3 deletions
app/components/App.js
+
16
−
2
View file @
0d1130ef
import
React
from
'
react
'
import
React
from
'
react
'
import
styled
from
'
styled-components
'
import
{
compose
}
from
'
recompose
'
import
{
compose
}
from
'
recompose
'
import
{
connect
}
from
'
react-redux
'
import
{
connect
}
from
'
react-redux
'
import
{
withRouter
,
matchPath
}
from
'
react-router-dom
'
import
{
withRouter
,
matchPath
}
from
'
react-router-dom
'
...
@@ -13,6 +14,17 @@ const getParams = routerPath => {
...
@@ -13,6 +14,17 @@ const getParams = routerPath => {
return
matchPath
(
routerPath
,
path
).
params
return
matchPath
(
routerPath
,
path
).
params
}
}
const
Root
=
styled
.
div
`
${({
disableLinks
})
=>
disableLinks
&&
`
button,
a {
pointer-events: none;
}
`
}
;
`
const
App
=
({
const
App
=
({
children
,
children
,
currentUser
,
currentUser
,
...
@@ -20,6 +32,7 @@ const App = ({
...
@@ -20,6 +32,7 @@ const App = ({
logoutUser
,
logoutUser
,
history
,
history
,
match
,
match
,
disableLinks
,
})
=>
{
})
=>
{
const
{
pathname
}
=
history
.
location
const
{
pathname
}
=
history
.
location
const
showLinks
=
pathname
.
match
(
/submit|manuscript/g
)
const
showLinks
=
pathname
.
match
(
/submit|manuscript/g
)
...
@@ -50,7 +63,7 @@ const App = ({
...
@@ -50,7 +63,7 @@ const App = ({
}
}
return
(
return
(
<
div
>
<
Root
disableLinks
=
{
disableLinks
}
>
<
AppBar
<
AppBar
brand
=
{
journal
.
metadata
.
name
}
brand
=
{
journal
.
metadata
.
name
}
navLinkComponents
=
{
links
}
navLinkComponents
=
{
links
}
...
@@ -59,7 +72,7 @@ const App = ({
...
@@ -59,7 +72,7 @@ const App = ({
/
>
/
>
<
div
>
{
children
}
<
/div
>
<
div
>
{
children
}
<
/div
>
<
/
div
>
<
/
Root
>
)
)
}
}
...
@@ -67,6 +80,7 @@ export default compose(
...
@@ -67,6 +80,7 @@ export default compose(
connect
(
connect
(
state
=>
({
state
=>
({
currentUser
:
state
.
currentUser
.
user
,
currentUser
:
state
.
currentUser
.
user
,
disableLinks
:
state
.
conversion
.
converting
,
}),
}),
{
logoutUser
:
actions
.
logoutUser
},
{
logoutUser
:
actions
.
logoutUser
},
),
),
...
...
This diff is collapsed.
Click to expand it.
config/default.js
+
3
−
1
View file @
0d1130ef
...
@@ -29,7 +29,9 @@ module.exports = {
...
@@ -29,7 +29,9 @@ module.exports = {
path
:
`
${
__dirname
}
/mailer`
,
path
:
`
${
__dirname
}
/mailer`
,
},
},
'
pubsweet-server
'
:
{
'
pubsweet-server
'
:
{
db
:
{},
db
:
{
port
:
5432
,
},
port
:
3000
,
port
:
3000
,
logger
,
logger
,
uploads
:
'
uploads
'
,
uploads
:
'
uploads
'
,
...
...
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