X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/864465d579c4b2caf06fce87b1861674758135f6..5da46a24f0381fb708e8b06f8daba6c9df6cd274:/src/views/user-profile-panel/user-profile-panel-root.tsx diff --git a/src/views/user-profile-panel/user-profile-panel-root.tsx b/src/views/user-profile-panel/user-profile-panel-root.tsx index 0beeab4f..53c0799f 100644 --- a/src/views/user-profile-panel/user-profile-panel-root.tsx +++ b/src/views/user-profile-panel/user-profile-panel-root.tsx @@ -24,27 +24,28 @@ import { IconButton, } from '@material-ui/core'; import { ArvadosTheme } from 'common/custom-theme'; -import { DataTableDefaultView } from 'components/data-table-default-view/data-table-default-view'; -import { PROFILE_EMAIL_VALIDATION } from "validators/validators"; +import { PROFILE_EMAIL_VALIDATION, PROFILE_URL_VALIDATION } from "validators/validators"; import { USER_PROFILE_PANEL_ID } from 'store/user-profile/user-profile-actions'; import { noop } from 'lodash'; -import { CopyIcon, GroupsIcon, MoreOptionsIcon } from 'components/icon/icon'; +import { DetailsIcon, GroupsIcon, MoreOptionsIcon } from 'components/icon/icon'; import { DataColumns } from 'components/data-table/data-table'; -import { ResourceLinkHeadUuid, ResourceLinkHeadPermissionLevel, ResourceLinkHead, ResourceLinkDelete, ResourceLinkTailIsVisible } from 'views-components/data-explorer/renderers'; +import { ResourceLinkHeadUuid, ResourceLinkHeadPermissionLevel, ResourceLinkHead, ResourceLinkDelete, ResourceLinkTailIsVisible, UserResourceAccountStatus } from 'views-components/data-explorer/renderers'; import { createTree } from 'models/tree'; import { getResource, ResourcesState } from 'store/resources/resources'; -import { snackbarActions, SnackbarKind } from 'store/snackbar/snackbar-actions'; -import CopyToClipboard from 'react-copy-to-clipboard'; +import { DefaultView } from 'components/default-view/default-view'; +import { CopyToClipboardSnackbar } from 'components/copy-to-clipboard-snackbar/copy-to-clipboard-snackbar'; -type CssRules = 'root' | 'adminRoot' | 'gridItem' | 'label' | 'readOnlyValue' | 'title' | 'description' | 'actions' | 'content' | 'copyIcon'; +type CssRules = 'root' | 'emptyRoot' | 'gridItem' | 'label' | 'readOnlyValue' | 'title' | 'description' | 'actions' | 'content' | 'copyIcon'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ root: { width: '100%', overflow: 'auto' }, - adminRoot: { - // ...theme.mixins.gutters() + emptyRoot: { + width: '100%', + overflow: 'auto', + padding: theme.spacing.unit * 4, }, gridItem: { height: 45, @@ -91,8 +92,9 @@ export interface UserProfilePanelRootDataProps { isSelf: boolean; isPristine: boolean; isValid: boolean; + isInaccessible: boolean; userUuid: string; - resources: ResourcesState + resources: ResourcesState; localCluster: string; } @@ -184,152 +186,151 @@ export const UserProfilePanelRoot = withStyles(styles)( this.setState({ value: TABS.PROFILE}); } - onCopy = (message: string) => { - this.props.dispatch(snackbarActions.OPEN_SNACKBAR({ - message, - hideDuration: 2000, - kind: SnackbarKind.SUCCESS - })); - } - render() { - return - - - - - {this.state.value === TABS.PROFILE && - - - - - {this.props.userUuid} - - - this.onCopy!("Copied")}> - - - - - - - - - this.handleContextMenu(event, this.props.userUuid)}> - - - - - -
- - - - - - - - - - - - - - - - - - - - - Role - - - - + if (this.props.isInaccessible) { + return ( + + + + + + ); + } else { + return + + + + + {this.state.value === TABS.PROFILE && + + + + + {this.props.userUuid} + + - - - - + + + + + + this.handleContextMenu(event, this.props.userUuid)}> + + + + - - - } - {this.state.value === TABS.GROUPS && -
- - } /> -
} -
; +
+ + + + + + + + + + + + + + + + + + + + + Role + + + + + + + + + + + + +
+
+ } + {this.state.value === TABS.GROUPS && +
+ +
} +
; + } } handleChange = (event: React.MouseEvent, value: number) => {