X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/d329bdf89ea30acc0e9a95bcb7bc4338f8beeebb..705b5cc1072bfb178195a90091e6d3dc120d193d:/src/views/main-panel/main-panel-root.tsx

diff --git a/src/views/main-panel/main-panel-root.tsx b/src/views/main-panel/main-panel-root.tsx
index 51287fa8c0..5853acb065 100644
--- a/src/views/main-panel/main-panel-root.tsx
+++ b/src/views/main-panel/main-panel-root.tsx
@@ -2,16 +2,15 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from 'react';
+import React from 'react';
 import { StyleRulesCallback, WithStyles, withStyles, Grid, LinearProgress } from '@material-ui/core';
-import { User } from "~/models/user";
-import { ArvadosTheme } from '~/common/custom-theme';
-import { WorkbenchPanel } from '~/views/workbench/workbench';
-import { LoginPanel } from '~/views/login-panel/login-panel';
-import { InactivePanel } from '~/views/inactive-panel/inactive-panel';
-import { WorkbenchLoadingScreen } from '~/views/workbench/workbench-loading-screen';
-import { MainAppBar } from '~/views-components/main-app-bar/main-app-bar';
-import { LinkAccountPanel } from '~/views/link-account-panel/link-account-panel';
+import { User } from "models/user";
+import { ArvadosTheme } from 'common/custom-theme';
+import { WorkbenchPanel } from 'views/workbench/workbench';
+import { LoginPanel } from 'views/login-panel/login-panel';
+import { InactivePanel } from 'views/inactive-panel/inactive-panel';
+import { WorkbenchLoadingScreen } from 'views/workbench/workbench-loading-screen';
+import { MainAppBar } from 'views-components/main-app-bar/main-app-bar';
 
 type CssRules = 'root';
 
@@ -30,23 +29,34 @@ export interface MainPanelRootDataProps {
     buildInfo: string;
     uuidPrefix: string;
     isNotLinking: boolean;
+    isLinkingPath: boolean;
+    siteBanner: string;
+    sessionIdleTimeout: number;
 }
 
 type MainPanelRootProps = MainPanelRootDataProps & WithStyles<CssRules>;
 
 export const MainPanelRoot = withStyles(styles)(
-    ({ classes, loading, working, user, buildInfo, uuidPrefix, isNotLinking }: MainPanelRootProps) =>
+    ({ classes, loading, working, user, buildInfo, uuidPrefix,
+        isNotLinking, isLinkingPath, siteBanner, sessionIdleTimeout }: MainPanelRootProps) =>
         loading
             ? <WorkbenchLoadingScreen />
-            : <> { isNotLinking ? <>
-               <MainAppBar
+            : <>
+                {isNotLinking && <MainAppBar
                     user={user}
                     buildInfo={buildInfo}
-                    uuidPrefix={uuidPrefix}>
-                    {working ? <LinearProgress color="secondary" /> : null}
-                </MainAppBar>
+                    uuidPrefix={uuidPrefix}
+                    siteBanner={siteBanner}>
+                    {working
+                        ? <LinearProgress color="secondary" data-cy="linear-progress" />
+                        : null}
+                </MainAppBar>}
                 <Grid container direction="column" className={classes.root}>
-                    { user ? (user.isActive ? <WorkbenchPanel /> : <InactivePanel />) : <LoginPanel />}
-               </Grid>
-            </> : user ? <LinkAccountPanel/> : <LoginPanel /> } </>
+                    {user
+                        ? (user.isActive || (!user.isActive && isLinkingPath)
+                            ? <WorkbenchPanel isNotLinking={isNotLinking} isUserActive={user.isActive} sessionIdleTimeout={sessionIdleTimeout} />
+                            : <InactivePanel />)
+                        : <LoginPanel />}
+                </Grid>
+            </>
 );
