import Star from '@material-ui/icons/Star';
import StarBorder from '@material-ui/icons/StarBorder';
import Warning from '@material-ui/icons/Warning';
-import Visibility from '@material-ui/icons/Lock';
+import ErrorOutline from '@material-ui/icons/ErrorOutline';
import VpnKey from '@material-ui/icons/VpnKey';
export type IconType = React.SFC<{ className?: string, style?: object }>;
export const ProjectIcon: IconType = (props) => <Folder {...props} />;
export const ProjectsIcon: IconType = (props) => <Inbox {...props} />;
export const ProvenanceGraphIcon: IconType = (props) => <DeviceHub {...props} />;
-export const ReadOnlyIcon: IconType = (props) => <Visibility {...props} />;
+export const ReadOnlyIcon: IconType = (props) => <ErrorOutline {...props} />;
export const RemoveIcon: IconType = (props) => <Delete {...props} />;
export const RemoveFavoriteIcon: IconType = (props) => <Star {...props} />;
export const PublicFavoriteIcon: IconType = (props) => <Public {...props} />;
import * as React from 'react';
import {
StyleRulesCallback, WithStyles, withStyles, Card,
- CardHeader, IconButton, CardContent, Grid, Tooltip
+ CardHeader, IconButton, CardContent, Grid, Tooltip, Chip
} from '@material-ui/core';
import { connect, DispatchProp } from "react-redux";
import { RouteComponentProps } from 'react-router';
const { classes, item, dispatch, isWritable } = this.props;
return item
? <>
- <Card className={classes.card}>
+ <Card data-cy='collection-info-panel' className={classes.card}>
<CardHeader
avatar={
<IconButton onClick={this.openCollectionDetails}>
<CollectionIcon className={classes.iconHeader} />
</IconButton>
}
- action={<div>
- {isWritable === false &&
- <Tooltip title="This collection is read-only">
- <ReadOnlyIcon />
- </Tooltip>}
+ action={
<Tooltip title="More options" disableFocusListener>
<IconButton
aria-label="More options"
<MoreOptionsIcon />
</IconButton>
</Tooltip>
- </div>}
- title={<span><IllegalNamingWarning name={item.name}/>{item.name}</span>}
+ }
+ title={
+ <span>
+ <IllegalNamingWarning name={item.name}/>
+ {item.name}
+ {isWritable || <Chip variant="outlined" icon={<ReadOnlyIcon />} label="Read-only"/>}
+ </span>
+ }
titleTypographyProps={this.titleProps}
subheader={item.description}
subheaderTypographyProps={this.titleProps} />
</Grid>
</CardContent>
</Card>
- <div className={classes.card}>
+ <div className={classes.card} data-cy="collection-files-panel">
<CollectionPanelFiles isWritable={isWritable} />
</div>
</>