[ARVADOS-WORKBENCH2] updated: 1.1.4-692-g7e52071
Git user
git at public.curoverse.com
Tue Aug 21 07:11:55 EDT 2018
Summary of changes:
src/views/collection-panel/collection-panel.tsx | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
via 7e52071485e119755819308658d10e461ed1c28a (commit)
from 9f472b932176e09be950115feab148da3be5c321 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 7e52071485e119755819308658d10e461ed1c28a
Author: Janicki Artur <artur.janicki at contractors.roche.com>
Date: Tue Aug 21 13:11:35 2018 +0200
refs #master Add tooltip and snackbar to collection panel when copy uuid
Arvados-DCO-1.1-Signed-off-by: Janicki Artur <artur.janicki at contractors.roche.com>
diff --git a/src/views/collection-panel/collection-panel.tsx b/src/views/collection-panel/collection-panel.tsx
index f476c93..559d4a9 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, Chip
+ CardHeader, IconButton, CardContent, Grid, Chip, Tooltip
} from '@material-ui/core';
import { connect, DispatchProp } from "react-redux";
import { RouteComponentProps } from 'react-router';
@@ -19,6 +19,7 @@ import * as CopyToClipboard from 'react-copy-to-clipboard';
import { TagResource } from '~/models/tag';
import { CollectionTagForm } from './collection-tag-form';
import { deleteCollectionTag } from '~/store/collection-panel/collection-panel-action';
+import { snackbarActions } from '~/store/snackbar/snackbar-actions';
type CssRules = 'card' | 'iconHeader' | 'tag' | 'copyIcon' | 'label' | 'value';
@@ -91,9 +92,11 @@ export const CollectionPanel = withStyles(styles)(
<DetailsAttribute classLabel={classes.label} classValue={classes.value}
label='Collection UUID'
value={item && item.uuid}>
- <CopyToClipboard text={item && item.uuid}>
- <CopyIcon className={classes.copyIcon} />
- </CopyToClipboard>
+ <Tooltip title="Copy uuid">
+ <CopyToClipboard text={item && item.uuid} onCopy={() => this.onCopy() }>
+ <CopyIcon className={classes.copyIcon} />
+ </CopyToClipboard>
+ </Tooltip>
</DetailsAttribute>
<DetailsAttribute classLabel={classes.label} classValue={classes.value}
label='Number of files' value='14' />
@@ -133,6 +136,13 @@ export const CollectionPanel = withStyles(styles)(
this.props.dispatch<any>(deleteCollectionTag(uuid));
}
+ onCopy = () => {
+ this.props.dispatch(snackbarActions.OPEN_SNACKBAR({
+ message: "Uuid has been copied",
+ hideDuration: 2000
+ }));
+ }
+
componentWillReceiveProps({ match, item, onItemRouteChange }: CollectionPanelProps) {
if (!item || match.params.id !== item.uuid) {
onItemRouteChange(match.params.id);
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list