Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
ec8c1c7c
Commit
ec8c1c7c
authored
1 year ago
by
vkovtun
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-13579: Replaced links with buttons in the navigation bar.
parent
97e54627
No related branches found
No related tags found
1 merge request
!40
SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ui-admin/src/js/components/database/data-browser/NavigationBar.jsx
+34
-14
34 additions, 14 deletions
...src/js/components/database/data-browser/NavigationBar.jsx
with
34 additions
and
14 deletions
ui-admin/src/js/components/database/data-browser/NavigationBar.jsx
+
34
−
14
View file @
ec8c1c7c
...
...
@@ -20,13 +20,13 @@ import { withStyles } from '@material-ui/core/styles'
import
autoBind
from
'
auto-bind
'
import
logger
from
"
@src/js/common/logger.js
"
;
import
Container
from
"
@src/js/components/common/form/Container.jsx
"
;
import
Link
from
"
@material-ui/core/Link
"
;
import
HomeIcon
from
"
@material-ui/icons/Home
"
;
import
IconButton
from
"
@material-ui/core/IconButton
"
;
import
Button
from
"
@material-ui/core/Button
"
;
const
color
=
'
default
'
const
buttonSize
=
'
small
'
const
iconButtonSize
=
'
small
'
const
iconButtonSize
=
'
medium
'
const
styles
=
theme
=>
({
containerDefault
:
{
...
...
@@ -36,15 +36,31 @@ const styles = theme => ({
marginLeft
:
theme
.
spacing
(
1
),
marginRight
:
theme
.
spacing
(
1
),
fontSize
:
'
1.125rem
'
,
'
& *
'
:
{
fontSize
:
'
1.125rem
'
alignItems
:
'
center
'
,
'
&>*
'
:
{
minWidth
:
'
auto
'
,
fontSize
:
'
1.125rem
'
,
textTransform
:
'
none
'
,
padding
:
'
0 0.25rem
'
,
margin
:
'
0.25rem
'
},
'
& *:not(:first-child):last-child
'
:
{
'
&>*:first-child
'
:
{
padding
:
'
0 0
'
,
margin
:
'
0.25rem 0.5rem 0.25rem 0.25rem
'
},
'
&>*:first-child svg
'
:
{
width
:
'
31.5px
'
,
height
:
'
31.5px
'
},
'
&>*:not(:first-child):last-child
'
:
{
pointerEvents
:
'
none
'
,
color
:
'
inherit
'
,
fontWeight
:
'
bold
'
}
},
homeButton
:
{
marginRight
:
'
1rem
'
}
})
class
NavigationBar
extends
React
.
Component
{
...
...
@@ -67,10 +83,10 @@ class NavigationBar extends React.Component {
return
{
folders
,
paths
}
}
render
Link
s
()
{
render
Item
s
()
{
const
{
classes
,
path
,
onPathChange
}
=
this
.
props
const
{
folders
,
paths
}
=
this
.
splitPath
(
path
)
const
components
=
new
Array
(
2
*
paths
.
length
+
2
)
const
components
=
new
Array
(
2
*
paths
.
length
+
1
)
components
[
0
]
=
<
IconButton
key
=
'root'
...
...
@@ -84,18 +100,22 @@ class NavigationBar extends React.Component {
<
HomeIcon
/>
</
IconButton
>
for
(
let
i
=
0
;
i
<
paths
.
length
;
i
++
)
{
components
[
2
*
i
+
2
]
=
'
/
'
components
[
2
*
i
+
3
]
=
<
Link
components
[
2
*
i
+
1
]
=
'
/
'
components
[
2
*
i
+
2
]
=
<
Button
key
=
{
'
path-
'
+
i
}
classes
=
{
{
root
:
classes
.
link
}
}
component
=
"button"
classes
=
{
{
root
:
classes
.
button
}
}
color
=
{
color
}
size
=
{
buttonSize
}
variant
=
'text'
onClick
=
{
()
=>
onPathChange
(
paths
[
i
])
}
>
{
folders
[
i
]
}
</
Link
>
</
Button
>
}
return
components
return
components
.
length
===
1
?
[
components
[
0
],
'
/
'
]
:
components
}
render
()
{
...
...
@@ -104,7 +124,7 @@ class NavigationBar extends React.Component {
return
(
<
Container
classes
=
{
{
containerDefault
:
classes
.
containerDefault
}
}
>
{
this
.
render
Link
s
()
}
{
this
.
render
Item
s
()
}
</
Container
>
)
}
...
...
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