X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/47e0dc87fa82bac593c53518e556ba7c55410288..7ae86efd9905582df4191910528c3803a68ba81b:/src/views/project-panel/project-panel.tsx

diff --git a/src/views/project-panel/project-panel.tsx b/src/views/project-panel/project-panel.tsx
index daf22b11..81d84990 100644
--- a/src/views/project-panel/project-panel.tsx
+++ b/src/views/project-panel/project-panel.tsx
@@ -16,8 +16,9 @@ import { ContainerRequestState } from '../../models/container-request';
 import { SortDirection } from '../../components/data-table/data-column';
 import { ResourceKind } from '../../models/resource';
 import { resourceLabel } from '../../common/labels';
-import { ProjectIcon, CollectionIcon, ProcessIcon, DefaultIcon } from '../../components/icon/icon';
+import { ProjectIcon, CollectionIcon, ProcessIcon, DefaultIcon, FavoriteIcon } from '../../components/icon/icon';
 import { ArvadosTheme } from '../../common/custom-theme';
+import { FavoriteStar } from '../../views-components/favorite-star/favorite-star';
 
 type CssRules = "toolbar" | "button";
 
@@ -37,20 +38,25 @@ const renderName = (item: ProjectPanelItem) =>
             {renderIcon(item)}
         </Grid>
         <Grid item>
-            <Typography color="primary">
+            <Typography color="default">
                 {item.name}
             </Typography>
         </Grid>
+        <Grid item>
+            <Typography variant="caption">
+                <FavoriteStar resourceUuid={item.uuid} />
+            </Typography>
+        </Grid>
     </Grid>;
 
 
 const renderIcon = (item: ProjectPanelItem) => {
     switch (item.kind) {
-        case ResourceKind.Project:
+        case ResourceKind.PROJECT:
             return <ProjectIcon />;
-        case ResourceKind.Collection:
+        case ResourceKind.COLLECTION:
             return <CollectionIcon />;
-        case ResourceKind.Process:
+        case ResourceKind.PROCESS:
             return <ProcessIcon />;
         default:
             return <DefaultIcon />;
@@ -98,7 +104,7 @@ export const columns: DataColumns<ProjectPanelItem, ProjectPanelFilter> = [
     {
         name: ProjectPanelColumnNames.NAME,
         selected: true,
-        sortDirection: SortDirection.Asc,
+        sortDirection: SortDirection.ASC,
         render: renderName,
         width: "450px"
     },
@@ -107,19 +113,19 @@ export const columns: DataColumns<ProjectPanelItem, ProjectPanelFilter> = [
         selected: true,
         filters: [
             {
-                name: ContainerRequestState.Committed,
+                name: ContainerRequestState.COMMITTED,
                 selected: true,
-                type: ContainerRequestState.Committed
+                type: ContainerRequestState.COMMITTED
             },
             {
-                name: ContainerRequestState.Final,
+                name: ContainerRequestState.FINAL,
                 selected: true,
-                type: ContainerRequestState.Final
+                type: ContainerRequestState.FINAL
             },
             {
-                name: ContainerRequestState.Uncommitted,
+                name: ContainerRequestState.UNCOMMITTED,
                 selected: true,
-                type: ContainerRequestState.Uncommitted
+                type: ContainerRequestState.UNCOMMITTED
             }
         ],
         render: renderStatus,
@@ -130,19 +136,19 @@ export const columns: DataColumns<ProjectPanelItem, ProjectPanelFilter> = [
         selected: true,
         filters: [
             {
-                name: resourceLabel(ResourceKind.Collection),
+                name: resourceLabel(ResourceKind.COLLECTION),
                 selected: true,
-                type: ResourceKind.Collection
+                type: ResourceKind.COLLECTION
             },
             {
-                name: resourceLabel(ResourceKind.Process),
+                name: resourceLabel(ResourceKind.PROCESS),
                 selected: true,
-                type: ResourceKind.Process
+                type: ResourceKind.PROCESS
             },
             {
-                name: resourceLabel(ResourceKind.Project),
+                name: resourceLabel(ResourceKind.PROJECT),
                 selected: true,
-                type: ResourceKind.Project
+                type: ResourceKind.PROJECT
             }
         ],
         render: item => renderType(item.kind),
@@ -163,7 +169,7 @@ export const columns: DataColumns<ProjectPanelItem, ProjectPanelFilter> = [
     {
         name: ProjectPanelColumnNames.LAST_MODIFIED,
         selected: true,
-        sortDirection: SortDirection.None,
+        sortDirection: SortDirection.NONE,
         render: item => renderDate(item.lastModified),
         width: "150px"
     }
@@ -184,7 +190,7 @@ interface ProjectPanelActionProps {
 }
 
 type ProjectPanelProps = ProjectPanelDataProps & ProjectPanelActionProps & DispatchProp
-                        & WithStyles<CssRules> & RouteComponentProps<{ id: string }>;
+    & WithStyles<CssRules> & RouteComponentProps<{ id: string }>;
 
 export const ProjectPanel = withStyles(styles)(
     connect((state: RootState) => ({ currentItemId: state.projects.currentItemId }))(
