import { SearchInput } from '../search-input/search-input';
import { ArvadosTheme } from "~/common/custom-theme";
-type CssRules = 'searchBox' | "toolbar" | "footer" | "root";
+type CssRules = 'searchBox' | "toolbar" | "footer" | "root" | 'moreOptionsButton';
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
searchBox: {
},
root: {
height: '100%'
+ },
+ moreOptionsButton: {
+ padding: 0
}
});
}
renderContextMenuTrigger = (item: T) =>
- <Grid container justify="flex-end">
+ <Grid container justify="center">
<Tooltip title="More options">
- <IconButton onClick={event => this.props.onContextMenu(event, item)}>
+ <IconButton className={this.props.classes.moreOptionsButton} onClick={event => this.props.onContextMenu(event, item)}>
<MoreVertIcon />
</IconButton>
</Tooltip>
dispatch<any>(openSharingDialog(uuid));
}
},
- {
- icon: MoveToIcon,
- name: "Move to",
- execute: (dispatch, resource) => dispatch<any>(openMoveCollectionDialog(resource))
- },
{
component: ToggleFavoriteAction,
execute: (dispatch, resource) => {
dispatch<any>(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!));
}
},
+ {
+ icon: MoveToIcon,
+ name: "Move to",
+ execute: (dispatch, resource) => dispatch<any>(openMoveCollectionDialog(resource))
+ },
{
icon: CopyIcon,
name: "Copy to project",
dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL());
}
},
- {
- icon: ProvenanceGraphIcon,
- name: "Provenance graph",
- execute: (dispatch, resource) => {
- // add code
- }
- },
+ // {
+ // icon: ProvenanceGraphIcon,
+ // name: "Provenance graph",
+ // execute: (dispatch, resource) => {
+ // // add code
+ // }
+ // },
{
icon: AdvancedIcon,
name: "Advanced",
execute: (dispatch, resource) => {
dispatch<any>(openAdvancedTabDialog(resource.uuid));
}
- },
- {
- icon: RemoveIcon,
- name: "Remove",
- execute: (dispatch, resource) => {
- // add code
- }
}
+ // {
+ // icon: RemoveIcon,
+ // name: "Remove",
+ // execute: (dispatch, resource) => {
+ // // add code
+ // }
+ // }
]];
dispatch<any>(openSharingDialog(uuid));
}
},
- {
- icon: MoveToIcon,
- name: "Move to",
- execute: (dispatch, resource) => {
- dispatch<any>(openMoveCollectionDialog(resource));
- }
- },
{
component: ToggleFavoriteAction,
execute: (dispatch, resource) => {
dispatch<any>(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!));
}
},
+ {
+ icon: MoveToIcon,
+ name: "Move to",
+ execute: (dispatch, resource) => {
+ dispatch<any>(openMoveCollectionDialog(resource));
+ }
+ },
{
icon: CopyIcon,
name: "Copy to project",
execute: dispatch => {
dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL());
}
- },
- {
- icon: RemoveIcon,
- name: "Remove",
- execute: (dispatch, resource) => {
- // add code
- }
}
+ // {
+ // icon: RemoveIcon,
+ // name: "Remove",
+ // execute: (dispatch, resource) => {
+ // // add code
+ // }
+ // }
]];
dispatch<any>(openSharingDialog(uuid));
}
},
- {
- icon: MoveToIcon,
- name: "Move to",
- execute: (dispatch, resource) => {
- dispatch<any>(openMoveProcessDialog(resource));
- }
- },
{
component: ToggleFavoriteAction,
execute: (dispatch, resource) => {
});
}
},
+ {
+ icon: MoveToIcon,
+ name: "Move to",
+ execute: (dispatch, resource) => {
+ dispatch<any>(openMoveProcessDialog(resource));
+ }
+ },
{
icon: CopyIcon,
name: "Copy to project",
dispatch<any>(openProcessCommandDialog(resource.uuid));
}
},
- {
- icon: DetailsIcon,
- name: "View details",
- execute: dispatch => {
- dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL());
- }
- },
{
icon: LogIcon,
name: "Log",
}
},
{
- icon: ProvenanceGraphIcon,
- name: "Provenance graph",
- execute: (dispatch, resource) => {
- // add code
+ icon: DetailsIcon,
+ name: "View details",
+ execute: dispatch => {
+ dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL());
}
},
+ // {
+ // icon: ProvenanceGraphIcon,
+ // name: "Provenance graph",
+ // execute: (dispatch, resource) => {
+ // // add code
+ // }
+ // },
{
icon: AdvancedIcon,
name: "Advanced",
execute: (dispatch, resource) => {
dispatch<any>(openAdvancedTabDialog(resource.uuid));
}
- },
- {
- icon: RemoveIcon,
- name: "Remove",
- execute: (dispatch, resource) => {
- // add code
- }
}
+ // {
+ // icon: RemoveIcon,
+ // name: "Remove",
+ // execute: (dispatch, resource) => {
+ // // add code
+ // }
+ // }
]];
dispatch<any>(openSharingDialog(uuid));
}
},
- {
- icon: MoveToIcon,
- name: "Move to",
- execute: (dispatch, resource) => {
- dispatch<any>(openMoveProcessDialog(resource));
- }
- },
{
component: ToggleFavoriteAction,
execute: (dispatch, resource) => {
});
}
},
+ {
+ icon: MoveToIcon,
+ name: "Move to",
+ execute: (dispatch, resource) => {
+ dispatch<any>(openMoveProcessDialog(resource));
+ }
+ },
{
icon: CopyIcon,
name: "Copy to project",
execute: dispatch => {
dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL());
}
- },
- {
- icon: RemoveIcon,
- name: "Remove",
- execute: (dispatch, resource) => {
- // add code
- }
}
+ // {
+ // icon: RemoveIcon,
+ // name: "Remove",
+ // execute: (dispatch, resource) => {
+ // // add code
+ // }
+ // }
]];
return { resource, dispatch: props.dispatch };
})((props: { resource?: TrashableResource, dispatch?: Dispatch<any> }) =>
<Tooltip title="Restore">
- <IconButton onClick={() => {
+ <IconButton style={{ padding: '0' }} onClick={() => {
if (props.resource && props.dispatch) {
props.dispatch(toggleTrashed(
props.resource.kind,
props.resource.ownerUuid,
props.resource.isTrashed
));
- }
- }}>
+ }}}
+ >
<RestoreFromTrashIcon />
</IconButton>
</Tooltip>