X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/10ce16c28de952f6533ca3cc9df909269e3d2a53..d7068565b29b52ffe6761a81e71f0725d120211a:/src/views-components/main-app-bar/main-app-bar.tsx?ds=sidebyside

diff --git a/src/views-components/main-app-bar/main-app-bar.tsx b/src/views-components/main-app-bar/main-app-bar.tsx
index 9c031080..de6be7e7 100644
--- a/src/views-components/main-app-bar/main-app-bar.tsx
+++ b/src/views-components/main-app-bar/main-app-bar.tsx
@@ -4,11 +4,10 @@
 
 import * as React from "react";
 import { AppBar, Toolbar, Typography, Grid, IconButton, Badge, Button, MenuItem } from "@material-ui/core";
-import { User, getUserFullname } from "../../models/user";
-import { SearchBar } from "../../components/search-bar/search-bar";
-import { Breadcrumbs, Breadcrumb } from "../../components/breadcrumbs/breadcrumbs";
-import { DropdownMenu } from "../../components/dropdown-menu/dropdown-menu";
-import { DetailsIcon, NotificationIcon, UserPanelIcon, HelpIcon } from "../../components/icon/icon";
+import { User, getUserFullname } from "~/models/user";
+import { SearchBar } from "~/components/search-bar/search-bar";
+import { DropdownMenu } from "~/components/dropdown-menu/dropdown-menu";
+import { DetailsIcon, NotificationIcon, UserPanelIcon, HelpIcon } from "~/components/icon/icon";
 
 export interface MainAppBarMenuItem {
     label: string;
@@ -23,20 +22,19 @@ export interface MainAppBarMenuItems {
 interface MainAppBarDataProps {
     searchText: string;
     searchDebounce?: number;
-    breadcrumbs: Breadcrumb[];
+    breadcrumbs: React.ComponentType<any>;
     user?: User;
     menuItems: MainAppBarMenuItems;
+    buildInfo: string;
 }
 
 export interface MainAppBarActionProps {
     onSearch: (searchText: string) => void;
-    onBreadcrumbClick: (breadcrumb: Breadcrumb) => void;
     onMenuItemClick: (menuItem: MainAppBarMenuItem) => void;
-    onContextMenu: (event: React.MouseEvent<HTMLElement>, breadcrumb: Breadcrumb) => void;
     onDetailsPanelToggle: () => void;
 }
 
-type MainAppBarProps = MainAppBarDataProps & MainAppBarActionProps;
+export type MainAppBarProps = MainAppBarDataProps & MainAppBarActionProps;
 
 export const MainAppBar: React.SFC<MainAppBarProps> = (props) => {
     return <AppBar position="static">
@@ -44,10 +42,10 @@ export const MainAppBar: React.SFC<MainAppBarProps> = (props) => {
             <Grid container justify="space-between">
                 <Grid item xs={3}>
                     <Typography variant="headline" color="inherit" noWrap>
-                        Arvados
+                        Arvados 2
                     </Typography>
                     <Typography variant="body1" color="inherit" noWrap >
-                        Workbench 2
+                        {props.buildInfo}
                     </Typography>
                 </Grid>
                 <Grid item xs={6} container alignItems="center">
@@ -67,15 +65,10 @@ export const MainAppBar: React.SFC<MainAppBarProps> = (props) => {
             </Grid>
         </Toolbar>
         <Toolbar >
-            {
-                props.user && <Breadcrumbs
-                    items={props.breadcrumbs}
-                    onClick={props.onBreadcrumbClick}
-                    onContextMenu={props.onContextMenu} />
-            }
-            { props.user && <IconButton color="inherit" onClick={props.onDetailsPanelToggle}>
-                    <DetailsIcon />
-                </IconButton>
+            {props.user && <props.breadcrumbs />}
+            {props.user && <IconButton color="inherit" onClick={props.onDetailsPanelToggle}>
+                <DetailsIcon />
+            </IconButton>
             }
         </Toolbar>
     </AppBar>;
