From 6f70ff0ea0f03cdcc6c563619ed723a6895535c7 Mon Sep 17 00:00:00 2001 From: Lucas Di Pentima Date: Fri, 22 May 2020 17:31:32 -0300 Subject: [PATCH] 16118: Changes read-only icon to be a slash+pencil fontawesome composite. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- package.json | 3 +++ src/components/icon/icon.tsx | 19 ++++++++++++-- .../collection-panel/collection-panel.tsx | 2 +- yarn.lock | 26 +++++++++++++++++++ 4 files changed, 47 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 16ad657b..0efdbd7d 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,9 @@ "version": "0.1.0", "private": true, "dependencies": { + "@fortawesome/fontawesome-svg-core": "1.2.28", + "@fortawesome/free-solid-svg-icons": "5.13.0", + "@fortawesome/react-fontawesome": "0.1.9", "@material-ui/core": "3.9.3", "@material-ui/icons": "3.0.1", "@types/debounce": "3.0.0", diff --git a/src/components/icon/icon.tsx b/src/components/icon/icon.tsx index a5fa5ddd..b3f44824 100644 --- a/src/components/icon/icon.tsx +++ b/src/components/icon/icon.tsx @@ -53,9 +53,25 @@ 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 ErrorOutline from '@material-ui/icons/ErrorOutline'; import VpnKey from '@material-ui/icons/VpnKey'; +// Import FontAwesome icons +import { library } from '@fortawesome/fontawesome-svg-core'; +import { faPencilAlt, faSlash } from '@fortawesome/free-solid-svg-icons'; +library.add( + faPencilAlt, + faSlash, +); + +export const ReadOnlyIcon = (props:any) => + +
+ + +
+
; + export type IconType = React.SFC<{ className?: string, style?: object }>; export const AddIcon: IconType = (props) => ; @@ -97,7 +113,6 @@ 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 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 defe73b9..aac9b300 100644 --- a/src/views/collection-panel/collection-panel.tsx +++ b/src/views/collection-panel/collection-panel.tsx @@ -115,7 +115,7 @@ export const CollectionPanel = withStyles(styles)( {item.name} - {isWritable || } label="Read-only" className={classes.readOnlyChip} />} + {isWritable || } label="Read-only" className={classes.readOnlyChip} />} } titleTypographyProps={this.titleProps} diff --git a/yarn.lock b/yarn.lock index da2629f5..d6677a74 100644 --- a/yarn.lock +++ b/yarn.lock @@ -50,6 +50,32 @@ debug "^3.1.0" lodash.once "^4.1.1" +"@fortawesome/fontawesome-common-types@^0.2.28": + version "0.2.28" + resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.28.tgz#1091bdfe63b3f139441e9cba27aa022bff97d8b2" + integrity sha512-gtis2/5yLdfI6n0ia0jH7NJs5i/Z/8M/ZbQL6jXQhCthEOe5Cr5NcQPhgTvFxNOtURE03/ZqUcEskdn2M+QaBg== + +"@fortawesome/fontawesome-svg-core@1.2.28": + version "1.2.28" + resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.28.tgz#e5b8c8814ef375f01f5d7c132d3c3a2f83a3abf9" + integrity sha512-4LeaNHWvrneoU0i8b5RTOJHKx7E+y7jYejplR7uSVB34+mp3Veg7cbKk7NBCLiI4TyoWS1wh9ZdoyLJR8wSAdg== + dependencies: + "@fortawesome/fontawesome-common-types" "^0.2.28" + +"@fortawesome/free-solid-svg-icons@5.13.0": + version "5.13.0" + resolved "https://registry.yarnpkg.com/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.13.0.tgz#44d9118668ad96b4fd5c9434a43efc5903525739" + integrity sha512-IHUgDJdomv6YtG4p3zl1B5wWf9ffinHIvebqQOmV3U+3SLw4fC+LUCCgwfETkbTtjy5/Qws2VoVf6z/ETQpFpg== + dependencies: + "@fortawesome/fontawesome-common-types" "^0.2.28" + +"@fortawesome/react-fontawesome@0.1.9": + version "0.1.9" + resolved "https://registry.yarnpkg.com/@fortawesome/react-fontawesome/-/react-fontawesome-0.1.9.tgz#c865b9286c707407effcec99958043711367cd02" + integrity sha512-49V3WNysLZU5fZ3sqSuys4nGRytsrxJktbv3vuaXkEoxv22C6T7TEG0TW6+nqVjMnkfCQd5xOnmJoZHMF78tOw== + dependencies: + prop-types "^15.7.2" + "@hapi/address@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@hapi/address/-/address-4.0.1.tgz#267301ddf7bc453718377a6fb3832a2f04a721dd" -- 2.30.2