[ARVADOS-WORKBENCH2] updated: 1.1.4-230-ga3f3b01
Git user
git at public.curoverse.com
Mon Jul 9 06:55:41 EDT 2018
Summary of changes:
src/components/breadcrumbs/breadcrumbs.tsx | 8 ++++----
src/views-components/main-app-bar/main-app-bar.tsx | 6 +++++-
src/views/workbench/workbench.tsx | 3 +++
3 files changed, 12 insertions(+), 5 deletions(-)
via a3f3b01052abf62ac96bb841747a657268498ad0 (commit)
from 0c8dea6be6e43f6331655cbf916946e5750b5aa9 (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 a3f3b01052abf62ac96bb841747a657268498ad0
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date: Mon Jul 9 12:55:23 2018 +0200
Add onContextMenu props to breadcrumbs
Feature #13694
Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
diff --git a/src/components/breadcrumbs/breadcrumbs.tsx b/src/components/breadcrumbs/breadcrumbs.tsx
index 41f7198..4868e13 100644
--- a/src/components/breadcrumbs/breadcrumbs.tsx
+++ b/src/components/breadcrumbs/breadcrumbs.tsx
@@ -14,9 +14,10 @@ export interface Breadcrumb {
interface BreadcrumbsProps {
items: Breadcrumb[];
onClick: (breadcrumb: Breadcrumb) => void;
+ onContextMenu: (event: React.MouseEvent<HTMLElement>, breadcrumb: Breadcrumb) => void;
}
-const Breadcrumbs: React.SFC<BreadcrumbsProps & WithStyles<CssRules>> = ({ classes, onClick, items }) => {
+const Breadcrumbs: React.SFC<BreadcrumbsProps & WithStyles<CssRules>> = ({ classes, onClick, onContextMenu, items }) => {
return <Grid container alignItems="center" wrap="nowrap">
{
items.map((item, index) => {
@@ -28,12 +29,11 @@ const Breadcrumbs: React.SFC<BreadcrumbsProps & WithStyles<CssRules>> = ({ class
color="inherit"
className={isLastItem ? classes.currentItem : classes.item}
onClick={() => onClick(item)}
- >
+ onContextMenu={event => onContextMenu(event, item)}>
<Typography
noWrap
color="inherit"
- className={classes.label}
- >
+ className={classes.label}>
{item.label}
</Typography>
</Button>
diff --git a/src/views-components/main-app-bar/main-app-bar.tsx b/src/views-components/main-app-bar/main-app-bar.tsx
index 1230e3b..d208239 100644
--- a/src/views-components/main-app-bar/main-app-bar.tsx
+++ b/src/views-components/main-app-bar/main-app-bar.tsx
@@ -35,6 +35,7 @@ export interface MainAppBarActionProps {
onSearch: (searchText: string) => void;
onBreadcrumbClick: (breadcrumb: Breadcrumb) => void;
onMenuItemClick: (menuItem: MainAppBarMenuItem) => void;
+ onContextMenu: (event: React.MouseEvent<HTMLElement>, breadcrumb: Breadcrumb) => void;
onDetailsPanelToggle: () => void;
}
@@ -70,7 +71,10 @@ export const MainAppBar: React.SFC<MainAppBarProps> = (props) => {
</Toolbar>
<Toolbar >
{
- props.user && <Breadcrumbs items={props.breadcrumbs} onClick={props.onBreadcrumbClick} />
+ props.user && <Breadcrumbs
+ items={props.breadcrumbs}
+ onClick={props.onBreadcrumbClick}
+ onContextMenu={props.onContextMenu} />
}
<IconButton color="inherit" onClick={props.onDetailsPanelToggle}>
<InfoIcon />
diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index 57f0898..3b8b00e 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -156,6 +156,9 @@ class Workbench extends React.Component<WorkbenchProps, WorkbenchState> {
onMenuItemClick: (menuItem: NavMenuItem) => menuItem.action(),
onDetailsPanelToggle: () => {
this.setState(prev => ({ isDetailsPanelOpened: !prev.isDetailsPanelOpened }));
+ },
+ onContextMenu: (event: React.MouseEvent<HTMLElement>, breadcrumb: Breadcrumb) => {
+ this.openContextMenu(event, breadcrumb);
}
};
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list