X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/2d60a3a656babffec5eefc4e3a0e88c8237c3896..d88f3e92dcbf4810fab55f098d7d4296107aa6ab:/src/views-components/details-panel/project-details.tsx diff --git a/src/views-components/details-panel/project-details.tsx b/src/views-components/details-panel/project-details.tsx index 18affbac..91c5e027 100644 --- a/src/views-components/details-panel/project-details.tsx +++ b/src/views-components/details-panel/project-details.tsx @@ -3,7 +3,10 @@ // SPDX-License-Identifier: AGPL-3.0 import * as React from 'react'; -import { ProjectIcon } from '~/components/icon/icon'; +import { compose } from 'redux'; +import { connect } from 'react-redux'; +import { openProjectPropertiesDialog } from '~/store/details-panel/details-panel-action'; +import { ProjectIcon, RenameIcon } from '~/components/icon/icon'; import { ProjectResource } from '~/models/project'; import { formatDate } from '~/common/formatters'; import { ResourceKind } from '~/models/resource'; @@ -11,32 +14,74 @@ import { resourceLabel } from '~/common/labels'; import { DetailsData } from "./details-data"; import { DetailsAttribute } from "~/components/details-attribute/details-attribute"; import { RichTextEditorLink } from '~/components/rich-text-editor-link/rich-text-editor-link'; +import { withStyles, StyleRulesCallback, Chip, WithStyles } from '@material-ui/core'; +import { ArvadosTheme } from '~/common/custom-theme'; export class ProjectDetails extends DetailsData { - getIcon(className?: string) { return ; } getDetails() { - return
- - {/* Missing attr */} - - - - - {/* Missing attr */} - {/**/} - - {this.item.description ? - - : '---' - } - -
; + return ; + } +} + +type CssRules = 'tag' | 'editIcon'; + +const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ + tag: { + marginRight: theme.spacing.unit, + marginBottom: theme.spacing.unit + }, + editIcon: { + fontSize: '1.125rem', + cursor: 'pointer' } +}); + + +interface ProjectDetailsComponentDataProps { + project: ProjectResource; +} + +interface ProjectDetailsComponentActionProps { + onClick: () => void; } + +const mapDispatchToProps = ({ onClick: openProjectPropertiesDialog }); + +type ProjectDetailsComponentProps = ProjectDetailsComponentDataProps & ProjectDetailsComponentActionProps & WithStyles; + +const ProjectDetailsComponent = connect(null, mapDispatchToProps)( + withStyles(styles)( + ({ classes, project, onClick }: ProjectDetailsComponentProps) =>
+ + {/* Missing attr */} + + + + + {/* Missing attr */} + {/**/} + + {project.description ? + + : '---' + } + + +
+ +
+
+ { + Object.keys(project.properties).map(k => { + return ; + }) + } +
+)); \ No newline at end of file