From: Lucas Di Pentima Date: Mon, 11 May 2020 19:53:27 +0000 (-0300) Subject: 16118: Changes read-only padlock icon with an explicit legend. X-Git-Tag: 2.1.0~29^2~9 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/bc49fa261517a5027980570a903b6b6aa5c1f82a 16118: Changes read-only padlock icon with an explicit legend. Also adds cypress-specific attributes to be able to get UI elements in a more readable way. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- diff --git a/src/components/icon/icon.tsx b/src/components/icon/icon.tsx index 163010e4..a5fa5ddd 100644 --- a/src/components/icon/icon.tsx +++ b/src/components/icon/icon.tsx @@ -53,7 +53,7 @@ import SettingsEthernet from '@material-ui/icons/SettingsEthernet'; 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 }>; @@ -97,7 +97,7 @@ export const ProcessIcon: IconType = (props) => ; export const ProjectIcon: IconType = (props) => ; export const ProjectsIcon: IconType = (props) => ; export const ProvenanceGraphIcon: IconType = (props) => ; -export const ReadOnlyIcon: IconType = (props) => ; +export const ReadOnlyIcon: IconType = (props) => ; export const RemoveIcon: IconType = (props) => ; export const RemoveFavoriteIcon: IconType = (props) => ; export const PublicFavoriteIcon: IconType = (props) => ; diff --git a/src/views/collection-panel/collection-panel.tsx b/src/views/collection-panel/collection-panel.tsx index 64de885f..be2afc72 100644 --- a/src/views/collection-panel/collection-panel.tsx +++ b/src/views/collection-panel/collection-panel.tsx @@ -5,7 +5,7 @@ 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'; @@ -91,18 +91,14 @@ export const CollectionPanel = withStyles(styles)( const { classes, item, dispatch, isWritable } = this.props; return item ? <> - + } - action={
- {isWritable === false && - - - } + action={ -
} - title={{item.name}} + } + title={ + + + {item.name} + {isWritable || } label="Read-only"/>} + + } titleTypographyProps={this.titleProps} subheader={item.description} subheaderTypographyProps={this.titleProps} /> @@ -171,7 +173,7 @@ export const CollectionPanel = withStyles(styles)(
-
+