back-button
authorPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Tue, 14 May 2019 09:14:34 +0000 (11:14 +0200)
committerPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Tue, 14 May 2019 09:14:34 +0000 (11:14 +0200)
Feature #15020

Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>

src/views/collection-content-address-panel/collection-content-address-panel.tsx
src/views/process-log-panel/process-log-main-card.tsx

index dfe1b5bf825375ed08321b130869bf2cc4328a86..425588f1ed3517f6c19e639f33b963335ae7e7df 100644 (file)
@@ -3,10 +3,7 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import * as React from 'react';
-import { Link } from 'react-router-dom';
-import {
-    StyleRulesCallback, WithStyles, withStyles, Grid
-} from '@material-ui/core';
+import { StyleRulesCallback, WithStyles, withStyles, Grid, Button } from '@material-ui/core';
 import { CollectionIcon } from '~/components/icon/icon';
 import { ArvadosTheme } from '~/common/custom-theme';
 import { BackIcon } from '~/components/icon/icon';
@@ -29,12 +26,12 @@ type CssRules = 'backLink' | 'backIcon' | 'card' | 'title' | 'iconHeader' | 'lin
 
 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     backLink: {
-        fontSize: '1rem',
+        fontSize: '14px',
         fontWeight: 600,
         display: 'flex',
         alignItems: 'center',
-        textDecoration: 'none',
         padding: theme.spacing.unit,
+        marginBottom: theme.spacing.unit,
         color: theme.palette.grey["700"],
     },
     backIcon: {
@@ -132,10 +129,12 @@ export const CollectionsContentAddressPanel = withStyles(styles)(
         class extends React.Component<CollectionContentAddressPanelActionProps & CollectionContentAddressDataProps & WithStyles<CssRules>> {
             render() {
                 return <Grid item xs={12}>
-                    {/* <Link to={`/collections/${collectionUuid}`} className={this.props.classes.backLink}>
+                    <Button
+                        onClick={() => history.back()}
+                        className={this.props.classes.backLink}>
                         <BackIcon className={this.props.classes.backIcon} />
                         Back
-                    </Link> */}
+                    </Button>
                     <DataExplorer
                         id={COLLECTIONS_CONTENT_ADDRESS_PANEL_ID}
                         onRowClick={this.props.onItemClick}
index 6b2521c083e70dc01e9372f884189b1cce3cd59d..ec6a912a71f8b6dae38296539458020a651ed5cf 100644 (file)
@@ -21,7 +21,7 @@ type CssRules = 'backLink' | 'backIcon' | 'card' | 'title' | 'iconHeader' | 'lin
 
 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     backLink: {
-        fontSize: '1rem',
+        fontSize: '14px',
         fontWeight: 600,
         display: 'flex',
         alignItems: 'center',
@@ -72,7 +72,7 @@ export const ProcessLogMainCard = withStyles(styles)(
     ({ classes, process, selectedFilter, filters, onChange, lines, onContextMenu, navigateToLogCollection }: ProcessLogMainCardProps & WithStyles<CssRules>) =>
         <Grid item xs={12}>
             <Link to={`/processes/${process.containerRequest.uuid}`} className={classes.backLink}>
-                <BackIcon className={classes.backIcon} /> Back
+                <BackIcon className={classes.backIcon} /> BACK
             </Link>
             <Card className={classes.card}>
                 <CardHeader