[ARVADOS-WORKBENCH2] updated: 1.2.0-286-gba5b505

Git user git at public.curoverse.com
Wed Sep 5 07:21:38 EDT 2018


Summary of changes:
 .../panel-default-view/panel-default-view.tsx      | 31 ++++++++++++++++++++++
 src/views/favorite-panel/favorite-panel.tsx        |  4 +--
 src/views/project-panel/project-panel.tsx          |  8 +++---
 src/views/trash-panel/trash-panel.tsx              |  6 ++---
 4 files changed, 40 insertions(+), 9 deletions(-)
 create mode 100644 src/components/panel-default-view/panel-default-view.tsx

       via  ba5b505f1cda78dafa9e17df7af33c9ae2c6829d (commit)
      from  c4b35e715ff5c6840aabfb76b540e2fad341b0ec (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 ba5b505f1cda78dafa9e17df7af33c9ae2c6829d
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Wed Sep 5 13:21:21 2018 +0200

    Extract panel-default-view component
    
    Feature #14160
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/components/panel-default-view/panel-default-view.tsx b/src/components/panel-default-view/panel-default-view.tsx
new file mode 100644
index 0000000..18be3ac
--- /dev/null
+++ b/src/components/panel-default-view/panel-default-view.tsx
@@ -0,0 +1,31 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import * as React from 'react';
+import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles';
+import { DefaultViewDataProps, DefaultView } from '~/components/default-view/default-view';
+
+type CssRules = 'classRoot' | 'classIcon' | 'classMessage';
+
+const styles: StyleRulesCallback<CssRules> = () => ({
+    classRoot: {
+        position: 'absolute',
+        width: '80%',
+        left: '50%',
+        top: '50%',
+        transform: 'translate(-50%, -50%)'
+    },
+    classMessage: {
+        fontSize: '1.75rem',
+    },
+    classIcon: {
+        fontSize: '6rem'
+    }
+});
+
+type PanelDefaultViewProps = Pick<DefaultViewDataProps, 'icon' | 'messages'> & WithStyles<CssRules>;
+
+export const PanelDefaultView = withStyles(styles)(
+    ({ classes, ...props }: PanelDefaultViewProps) =>
+        <DefaultView {...classes} {...props} />);
diff --git a/src/views/favorite-panel/favorite-panel.tsx b/src/views/favorite-panel/favorite-panel.tsx
index ce86adf..6ba05b0 100644
--- a/src/views/favorite-panel/favorite-panel.tsx
+++ b/src/views/favorite-panel/favorite-panel.tsx
@@ -28,9 +28,9 @@ import { openContextMenu, resourceKindToContextMenuKind } from '~/store/context-
 import { loadDetailsPanel } from '~/store/details-panel/details-panel-action';
 import { navigateTo } from '~/store/navigation/navigation-action';
 import { ContainerRequestState } from "~/models/container-request";
-import { DefaultView } from '~/components/default-view/default-view';
 import { FavoritesState } from '../../store/favorites/favorites-reducer';
 import { RootState } from '~/store/store';
+import { PanelDefaultView } from '~/components/panel-default-view/panel-default-view';
 
 type CssRules = "toolbar" | "button";
 
@@ -176,7 +176,7 @@ export const FavoritePanel = withStyles(styles)(
                         onRowDoubleClick={this.props.onItemDoubleClick}
                         onContextMenu={this.props.onContextMenu}
                         contextMenuColumn={true} />
-                    : <DefaultView
+                    : <PanelDefaultView
                         icon={FavoriteIcon}
                         messages={['Your favorites list is empty.']} />;
             }
diff --git a/src/views/project-panel/project-panel.tsx b/src/views/project-panel/project-panel.tsx
index 19d4ee1..3e50395 100644
--- a/src/views/project-panel/project-panel.tsx
+++ b/src/views/project-panel/project-panel.tsx
@@ -25,10 +25,10 @@ import { ProjectResource } from '~/models/project';
 import { navigateTo } from '~/store/navigation/navigation-action';
 import { getProperty } from '~/store/properties/properties';
 import { PROJECT_PANEL_CURRENT_UUID } from '~/store/project-panel/project-panel-action';
-import { openCollectionCreateDialog } from '../../store/collections/collection-create-actions';
+import { openCollectionCreateDialog } from '~/store/collections/collection-create-actions';
 import { openProjectCreateDialog } from '~/store/projects/project-create-actions';
-import { filterResources } from '../../store/resources/resources';
-import { DefaultView } from '~/components/default-view/default-view';
+import { filterResources } from '~/store/resources/resources';
+import { PanelDefaultView } from '~/components/panel-default-view/panel-default-view';
 
 type CssRules = 'root' | "toolbar" | "button";
 
@@ -166,7 +166,7 @@ export const ProjectPanel = withStyles(styles)(
                             onRowDoubleClick={this.handleRowDoubleClick}
                             onContextMenu={this.handleContextMenu}
                             contextMenuColumn={true} />
-                        : <DefaultView
+                        : <PanelDefaultView
                             icon={ProjectIcon}
                             messages={['Your project is empty.', 'Please create a project or create a collection and upload a data.']} />
                     }
diff --git a/src/views/trash-panel/trash-panel.tsx b/src/views/trash-panel/trash-panel.tsx
index 2c9d61e..ad78360 100644
--- a/src/views/trash-panel/trash-panel.tsx
+++ b/src/views/trash-panel/trash-panel.tsx
@@ -28,10 +28,10 @@ import {
 } from "~/views-components/data-explorer/renderers";
 import { navigateTo } from "~/store/navigation/navigation-action";
 import { loadDetailsPanel } from "~/store/details-panel/details-panel-action";
-import { toggleCollectionTrashed, toggleProjectTrashed, toggleTrashed } from "~/store/trash/trash-actions";
+import { toggleTrashed } from "~/store/trash/trash-actions";
 import { ContextMenuKind } from "~/views-components/context-menu/context-menu";
 import { Dispatch } from "redux";
-import { DefaultView } from '~/components/default-view/default-view';
+import { PanelDefaultView } from '~/components/panel-default-view/panel-default-view';
 
 type CssRules = "toolbar" | "button";
 
@@ -170,7 +170,7 @@ export const TrashPanel = withStyles(styles)(
                         onRowDoubleClick={this.handleRowDoubleClick}
                         onContextMenu={this.handleContextMenu}
                         contextMenuColumn={false} />
-                    : <DefaultView
+                    : <PanelDefaultView
                         icon={TrashIcon}
                         messages={['Your trash list is empty.']} />;
             }

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list