X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b6ac7fe88d347582d39fffa002e300af222c578f..e5682f2f1490de87f7727a364c717c06d5f58eee:/src/components/tree/tree.tsx diff --git a/src/components/tree/tree.tsx b/src/components/tree/tree.tsx index 3ae884b67c..e37086213e 100644 --- a/src/components/tree/tree.tsx +++ b/src/components/tree/tree.tsx @@ -5,7 +5,7 @@ import React from 'react'; import { List, ListItem, ListItemIcon, Checkbox, Radio, Collapse } from "@material-ui/core"; import { StyleRulesCallback, withStyles, WithStyles } from '@material-ui/core/styles'; -import { CollectionIcon, DefaultIcon, DirectoryIcon, FileIcon, ProjectIcon, FilterGroupIcon } from 'components/icon/icon'; +import { CollectionIcon, DefaultIcon, DirectoryIcon, FileIcon, ProjectIcon, FilterGroupIcon, FreezeIcon } from 'components/icon/icon'; import { ReactElement } from "react"; import CircularProgress from '@material-ui/core/CircularProgress'; import classnames from "classnames"; @@ -26,7 +26,8 @@ type CssRules = 'list' | 'toggableIcon' | 'checkbox' | 'childItem' - | 'childItemIcon'; + | 'childItemIcon' + | 'frozenIcon'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ list: { @@ -83,6 +84,11 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ active: { color: theme.palette.primary.main, }, + frozenIcon: { + fontSize: 20, + color: theme.palette.grey["600"], + marginLeft: '10px', + }, }); export enum TreeItemStatus { @@ -97,9 +103,12 @@ export interface TreeItem { open: boolean; active: boolean; selected?: boolean; + initialState?: boolean; + indeterminate?: boolean; flatTree?: boolean; status: TreeItemStatus; items?: Array>; + isFrozen?: boolean; } export interface TreeProps { @@ -251,6 +260,9 @@ const FlatTree = (props: FlatTreeProps) => {item.data.name} + { + !!item.data.frozenByUuid ? : null + } ) @@ -268,7 +280,6 @@ export const Tree = withStyles(styles)( : () => this.props.showSelection ? true : false; const { levelIndentation = 20, itemRightPadding = 20 } = this.props; - return {items && items.map((it: TreeItem, idx: number) =>
@@ -292,6 +303,7 @@ export const Tree = withStyles(styles)( {showSelection(it) && !useRadioButtons && }