X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/9428e5c6a434e0f15e44e4afdd420f866caeffbd..64b25cb874d430f23d169606265c9534a52bdc6c:/src/views/trash-panel/trash-panel.tsx diff --git a/src/views/trash-panel/trash-panel.tsx b/src/views/trash-panel/trash-panel.tsx index 23927aed..92febd8a 100644 --- a/src/views/trash-panel/trash-panel.tsx +++ b/src/views/trash-panel/trash-panel.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: AGPL-3.0 import * as React from 'react'; -import { IconButton, StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core'; +import { IconButton, StyleRulesCallback, WithStyles, withStyles, Tooltip } from '@material-ui/core'; import { DataExplorer } from "~/views-components/data-explorer/data-explorer"; import { connect, DispatchProp } from 'react-redux'; import { DataColumns } from '~/components/data-table/data-table'; @@ -63,18 +63,20 @@ export const ResourceRestore = const resource = getResource(props.uuid)(state.resources); return { resource, dispatch: props.dispatch }; })((props: { resource?: TrashableResource, dispatch?: Dispatch }) => - { - if (props.resource && props.dispatch) { - props.dispatch(toggleTrashed( - props.resource.kind, - props.resource.uuid, - props.resource.ownerUuid, - props.resource.isTrashed - )); - } - }}> - - + + { + if (props.resource && props.dispatch) { + props.dispatch(toggleTrashed( + props.resource.kind, + props.resource.uuid, + props.resource.ownerUuid, + props.resource.isTrashed + )); + } + }}> + + + ); export const trashPanelColumns: DataColumns = [ @@ -84,7 +86,7 @@ export const trashPanelColumns: DataColumns = [ configurable: true, sortDirection: SortDirection.ASC, filters: [], - render: uuid => + render: uuid => }, { name: TrashPanelColumnNames.TYPE, @@ -97,18 +99,13 @@ export const trashPanelColumns: DataColumns = [ selected: true, type: ResourceKind.COLLECTION }, - { - name: resourceLabel(ResourceKind.PROCESS), - selected: true, - type: ResourceKind.PROCESS - }, { name: resourceLabel(ResourceKind.PROJECT), selected: true, type: ResourceKind.PROJECT } ], - render: uuid => , + render: uuid => , }, { name: TrashPanelColumnNames.FILE_SIZE, @@ -140,7 +137,7 @@ export const trashPanelColumns: DataColumns = [ configurable: false, sortDirection: SortDirection.NONE, filters: [], - render: uuid => + render: uuid => } ]; @@ -158,23 +155,17 @@ export const TrashPanel = withStyles(styles)( }))( class extends React.Component { render() { - return this.hasAnyTrashedResources() - ? } /> - : ; - } - - hasAnyTrashedResources = () => { - // TODO: implement check if there is anything in the trash, - // without taking pagination into the account - return true; + return + } />; } handleContextMenu = (event: React.MouseEvent, resourceUuid: string) => {