[ARVADOS-WORKBENCH2] updated: 1.1.4-380-g2953c96

Git user git at public.curoverse.com
Tue Jul 24 06:29:20 EDT 2018


Summary of changes:
 src/store/favorite-panel/favorite-panel-middleware.ts | 2 ++
 src/views/favorite-panel/favorite-panel.tsx           | 6 ++++++
 src/views/workbench/workbench.tsx                     | 9 ++++++++-
 3 files changed, 16 insertions(+), 1 deletion(-)

       via  2953c96ede69c1d518ae05f1a57239aad951d0e7 (commit)
      from  224cde8bd16074b2755cedf44ae048340bc82969 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 2953c96ede69c1d518ae05f1a57239aad951d0e7
Author: Daniel Kos <daniel.kos at contractors.roche.com>
Date:   Tue Jul 24 12:29:17 2018 +0200

    Add favorite star, fix post merge compilation problems
    
    Feature #13753
    
    Arvados-DCO-1.1-Signed-off-by: Daniel Kos <daniel.kos at contractors.roche.com>

diff --git a/src/store/favorite-panel/favorite-panel-middleware.ts b/src/store/favorite-panel/favorite-panel-middleware.ts
index 27e36b0..791c6bd 100644
--- a/src/store/favorite-panel/favorite-panel-middleware.ts
+++ b/src/store/favorite-panel/favorite-panel-middleware.ts
@@ -22,6 +22,7 @@ import {
 import { FavoritePanelItem, resourceToDataItem } from "../../views/favorite-panel/favorite-panel-item";
 import { LinkResource } from "../../models/link";
 import { ResourceKind } from "../../models/resource";
+import { checkPresenceInFavorites } from "../favorites/favorites-actions";
 
 export const favoritePanelMiddleware: Middleware = store => next => {
     next(dataExplorerActions.SET_COLUMNS({ id: FAVORITE_PANEL_ID, columns }));
@@ -76,6 +77,7 @@ export const favoritePanelMiddleware: Middleware = store => next => {
                                 page: Math.floor(response.offset / response.limit),
                                 rowsPerPage: response.limit
                             }));
+                            store.dispatch<any>(checkPresenceInFavorites(response.items.map(item => item.uuid)));
                         });
                 } else {
                     store.dispatch(dataExplorerActions.SET_ITEMS({
diff --git a/src/views/favorite-panel/favorite-panel.tsx b/src/views/favorite-panel/favorite-panel.tsx
index 4c5b5bd..6f4cedb 100644
--- a/src/views/favorite-panel/favorite-panel.tsx
+++ b/src/views/favorite-panel/favorite-panel.tsx
@@ -18,6 +18,7 @@ import { ResourceKind } from '../../models/resource';
 import { resourceLabel } from '../../common/labels';
 import { ProjectIcon, CollectionIcon, ProcessIcon, DefaultIcon } from '../../components/icon/icon';
 import { ArvadosTheme } from '../../common/custom-theme';
+import { FavoriteStar } from "../../views-components/favorite-star/favorite-star";
 
 type CssRules = "toolbar" | "button";
 
@@ -41,6 +42,11 @@ const renderName = (item: FavoritePanelItem) =>
                 {item.name}
             </Typography>
         </Grid>
+        <Grid item>
+            <Typography variant="caption">
+                <FavoriteStar resourceUuid={item.uuid} />
+            </Typography>
+        </Grid>
     </Grid>;
 
 
diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index 862fbd5..43033d9 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -233,7 +233,14 @@ export const Workbench = withStyles(styles)(
 
             renderFavoritePanel = (props: RouteComponentProps<{ id: string }>) => <FavoritePanel
                 onItemRouteChange={itemId => this.props.dispatch<any>(setFavoriteItem(itemId, ItemMode.ACTIVE))}
-                onContextMenu={(event, item) => this.openContextMenu(event, item.uuid, ContextMenuKind.Favorite)}
+                onContextMenu={(event, item) => {
+                    const kind = item.kind === ResourceKind.Project ? ContextMenuKind.Project : ContextMenuKind.Resource;
+                    this.openContextMenu(event, {
+                        uuid: item.uuid,
+                        name: item.name,
+                        kind,
+                    });
+                }}
                 onDialogOpen={this.handleCreationDialogOpen}
                 onItemClick={item => {
                     this.props.dispatch<any>(loadDetails(item.uuid, item.kind as ResourceKind));

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list