From b2783aa70f5dd8c13bcd345a5f89801a24feb374 Mon Sep 17 00:00:00 2001 From: Christopher Pauley Date: Thu, 31 Aug 2017 20:33:01 -0700 Subject: [PATCH] Breadcrumb Styles Improvement & "copy path" icon button (#180) * improving breadcrumb styles, adding copy path button * improve spacing --- app/components/Secrets/Generic/Generic.jsx | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/app/components/Secrets/Generic/Generic.jsx b/app/components/Secrets/Generic/Generic.jsx index 3941bb0..cae3b64 100644 --- a/app/components/Secrets/Generic/Generic.jsx +++ b/app/components/Secrets/Generic/Generic.jsx @@ -16,6 +16,9 @@ import JsonEditor from '../../shared/JsonEditor.jsx'; import SecretWrapper from '../../shared/Wrapping/Wrapper.jsx' import { Link } from 'react-router' import ItemList from '../../shared/ItemList/ItemList.jsx'; +import copy from 'copy-to-clipboard'; +import ContentContentCopy from 'material-ui/svg-icons/content/content-copy'; +import IconButton from 'material-ui/IconButton'; function snackBarMessage(message) { let ev = new CustomEvent("snackbar", { detail: { message: message } }); @@ -312,7 +315,15 @@ export default class GenericSecretBackend extends React.Component { let components = _.initial(this.getBaseDir(this.state.currentLogicalPath).split('/')); return _.map(components, (dir, index) => { var relativelink = [].concat(components).slice(0, index + 1).join('/') + '/'; - return (}>{dir}) + if (index === 0) { + // no left padding for first item + var stepLabelStyle = { paddingLeft: '0'} + var iconContainerStyle = { padding: '0' } + } else { + var stepLabelStyle = { paddingLeft: '10px'} + var iconContainerStyle = {} + } + return (}>{dir}) }); } @@ -329,7 +340,12 @@ export default class GenericSecretBackend extends React.Component { - + + { copy(this.state.currentLogicalPath) }} > + + + +