Commit 991aee6c authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Minor gui changes.

parent 03a23238
Pipeline #67218 passed with stages
in 15 minutes
...@@ -28,7 +28,7 @@ import {help as metainfoHelp, default as MetaInfoBrowser} from './metaInfoBrowse ...@@ -28,7 +28,7 @@ import {help as metainfoHelp, default as MetaInfoBrowser} from './metaInfoBrowse
import packageJson from '../../package.json' import packageJson from '../../package.json'
import { Cookies, withCookies } from 'react-cookie' import { Cookies, withCookies } from 'react-cookie'
import Markdown from './Markdown' import Markdown from './Markdown'
import {help as uploadHelp, default as Uploads} from './uploads/Uploads' import {help as uploadHelp, default as UploadPage} from './uploads/UploadPage'
import ResolvePID from './entry/ResolvePID' import ResolvePID from './entry/ResolvePID'
import DatasetPage from './DatasetPage' import DatasetPage from './DatasetPage'
import { capitalize } from '../utils' import { capitalize } from '../utils'
...@@ -456,7 +456,7 @@ export default class App extends React.Component { ...@@ -456,7 +456,7 @@ export default class App extends React.Component {
exact: true, exact: true,
singleton: true, singleton: true,
path: '/uploads', path: '/uploads',
render: props => <Uploads {...props} /> render: props => <UploadPage {...props} />
}, },
'metainfo': { 'metainfo': {
exact: true, exact: true,
......
...@@ -1059,7 +1059,7 @@ class EditUserMetadataDialogUnstyled extends React.Component { ...@@ -1059,7 +1059,7 @@ class EditUserMetadataDialogUnstyled extends React.Component {
if (submitting) { if (submitting) {
return <DialogActions> return <DialogActions>
<DialogContentText color="error" style={{marginLeft: 16}}>Do not close the page. This might take up to several minutes for editing many entries.</DialogContentText> <DialogContentText style={{marginLeft: 16}}>Do not close the page. This might take up to several minutes for editing many entries.</DialogContentText>
<span style={{flexGrow: 1}} /> <span style={{flexGrow: 1}} />
<div className={classes.submitWrapper}> <div className={classes.submitWrapper}>
<Button onClick={this.handleSubmit} disabled={!submitEnabled} color="primary"> <Button onClick={this.handleSubmit} disabled={!submitEnabled} color="primary">
......
...@@ -30,7 +30,6 @@ class ElementUnstyled extends React.Component { ...@@ -30,7 +30,6 @@ class ElementUnstyled extends React.Component {
}, },
button: { button: {
border: '1px solid', border: '1px solid',
borderColor: '#555',
paddingTop: theme.spacing.unit, paddingTop: theme.spacing.unit,
paddingBottom: theme.spacing.unit, paddingBottom: theme.spacing.unit,
paddingLeft: 0, paddingLeft: 0,
...@@ -42,7 +41,8 @@ class ElementUnstyled extends React.Component { ...@@ -42,7 +41,8 @@ class ElementUnstyled extends React.Component {
textTransform: 'none', textTransform: 'none',
minWidth: 0, minWidth: 0,
minHeight: 0, minHeight: 0,
borderRadius: 0 borderRadius: 0,
boxShadow: 'none'
}, },
containedPrimary: { containedPrimary: {
backgroundColor: theme.palette.primary.main backgroundColor: theme.palette.primary.main
...@@ -75,6 +75,11 @@ class ElementUnstyled extends React.Component { ...@@ -75,6 +75,11 @@ class ElementUnstyled extends React.Component {
} }
const disabled = count <= 0 const disabled = count <= 0
const style = (count > 0) ? {
backgroundColor: !selected ? heatmapScale(count).hex() : undefined,
borderColor: '#555'
} : undefined
return ( return (
<div className={classes.root}> <div className={classes.root}>
<Tooltip title={element.name}> <Tooltip title={element.name}>
...@@ -82,7 +87,7 @@ class ElementUnstyled extends React.Component { ...@@ -82,7 +87,7 @@ class ElementUnstyled extends React.Component {
<Button <Button
disabled={disabled} disabled={disabled}
classes={buttonClasses} classes={buttonClasses}
style={{backgroundColor: count > 0 && !selected ? heatmapScale(count).hex() : undefined}} style={style}
onClick={this.props.onClick} variant="contained" onClick={this.props.onClick} variant="contained"
color={selected ? 'primary' : 'default'} color={selected ? 'primary' : 'default'}
> >
......
...@@ -126,8 +126,8 @@ class QuantityHistogram extends React.Component { ...@@ -126,8 +126,8 @@ class QuantityHistogram extends React.Component {
.attr('width', d => x(d.value) - x(0)) .attr('width', d => x(d.value) - x(0))
.attr('height', y.bandwidth()) .attr('height', y.bandwidth())
.style('fill', rectColor) .style('fill', rectColor)
.style('stroke', '#000') // .style('stroke', '#000')
.style('stroke-width', '1px') // .style('stroke-width', '1px')
.style('shape-rendering', 'geometricPrecision') .style('shape-rendering', 'geometricPrecision')
item item
......
...@@ -92,7 +92,7 @@ be changed after publishing data. The documentation on the [user data page](${gu ...@@ -92,7 +92,7 @@ be changed after publishing data. The documentation on the [user data page](${gu
contains more information. contains more information.
` `
class Uploads extends React.Component { class UploadPage extends React.Component {
static propTypes = { static propTypes = {
classes: PropTypes.object.isRequired, classes: PropTypes.object.isRequired,
api: PropTypes.object.isRequired, api: PropTypes.object.isRequired,
...@@ -350,4 +350,4 @@ class Uploads extends React.Component { ...@@ -350,4 +350,4 @@ class Uploads extends React.Component {
} }
} }
export default compose(withApi(true, false, 'To upload data, you must have a Nomad Repository account and you must be logged in.'), withCookies, withStyles(Uploads.styles))(Uploads) export default compose(withApi(true, false, 'To upload data, you must have a Nomad Repository account and you must be logged in.'), withCookies, withStyles(UploadPage.styles))(UploadPage)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment