X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/45ee419ff7952fc722a139666c327a321a92cc81..05010c44073b52c0e414d180cfc21bae215c4d33:/src/views-components/main-app-bar/main-app-bar.tsx

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 ce1cab4c..442b9034 100644
--- a/src/views-components/main-app-bar/main-app-bar.tsx
+++ b/src/views-components/main-app-bar/main-app-bar.tsx
@@ -2,18 +2,19 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from "react";
+import React from "react";
 import { AppBar, Toolbar, Typography, Grid } from "@material-ui/core";
 import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles';
 import { Link } from "react-router-dom";
-import { User } from "~/models/user";
-import { SearchBar } from "~/views-components/search-bar/search-bar";
-import { Routes } from '~/routes/routes';
-import { NotificationsMenu } from "~/views-components/main-app-bar/notifications-menu";
-import { AccountMenu } from "~/views-components/main-app-bar/account-menu";
-import { HelpMenu } from '~/views-components/main-app-bar/help-menu';
+import { User } from "models/user";
+import { SearchBar } from "views-components/search-bar/search-bar";
+import { Routes } from 'routes/routes';
+import { NotificationsMenu } from "views-components/main-app-bar/notifications-menu";
+import { AccountMenu } from "views-components/main-app-bar/account-menu";
+import { HelpMenu } from 'views-components/main-app-bar/help-menu';
 import { ReactNode } from "react";
-import { AdminMenu } from "~/views-components/main-app-bar/admin-menu";
+import { AdminMenu } from "views-components/main-app-bar/admin-menu";
+import { pluginConfig } from 'plugins';
 
 type CssRules = 'toolbar' | 'link';
 
@@ -42,20 +43,20 @@ export const MainAppBar = withStyles(styles)(
         return <AppBar position="absolute">
             <Toolbar className={props.classes.toolbar}>
                 <Grid container justify="space-between">
-                    <Grid container item xs={3} direction="column" justify="center">
+                    {pluginConfig.appBarLeft || <Grid container item xs={3} direction="column" justify="center">
                         <Typography variant='h6' color="inherit" noWrap>
                             <Link to={Routes.ROOT} className={props.classes.link}>
                                 <span dangerouslySetInnerHTML={{ __html: props.siteBanner }} /> ({props.uuidPrefix})
-                            </Link>
+                </Link>
                         </Typography>
                         <Typography variant="caption" color="inherit">{props.buildInfo}</Typography>
-                    </Grid>
+                    </Grid>}
                     <Grid
                         item
                         xs={6}
                         container
                         alignItems="center">
-                        {props.user && props.user.isActive && <SearchBar />}
+                        {pluginConfig.appBarMiddle || (props.user && props.user.isActive && <SearchBar />)}
                     </Grid>
                     <Grid
                         item
@@ -64,14 +65,17 @@ export const MainAppBar = withStyles(styles)(
                         alignItems="center"
                         justify="flex-end"
                         wrap="nowrap">
-                        {props.user
-                            ? <>
-                                <NotificationsMenu />
-                                <AccountMenu />
-                                {props.user.isAdmin && <AdminMenu />}
-                                <HelpMenu />
-                            </>
-                            : <HelpMenu />}
+                        {props.user ? <>
+                            <NotificationsMenu />
+                            <AccountMenu />
+                            {pluginConfig.appBarRight ||
+                                <>
+                                    {props.user.isAdmin && <AdminMenu />}
+                                    <HelpMenu />
+                                </>}
+                        </> :
+                            pluginConfig.appBarRight || <HelpMenu />
+                        }
                     </Grid>
                 </Grid>
             </Toolbar>
