X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/f0a64666816383d2641d5fa7ea22019441ac4464..05cafa96eea1840c14bed54f5a726e2c79d48a98:/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 e7daaf00..543e9c63 100644 --- a/src/views/main-panel/main-panel-root.tsx +++ b/src/views/main-panel/main-panel-root.tsx @@ -2,15 +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 { 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'; @@ -31,25 +31,42 @@ export interface MainPanelRootDataProps { isNotLinking: boolean; isLinkingPath: boolean; siteBanner: string; + sessionIdleTimeout: number; + sidePanelIsCollapsed: boolean; } -type MainPanelRootProps = MainPanelRootDataProps & WithStyles; +interface MainPanelRootDispatchProps { + toggleSidePanel: () => void +} + +type MainPanelRootProps = MainPanelRootDataProps & MainPanelRootDispatchProps & WithStyles; export const MainPanelRoot = withStyles(styles)( ({ classes, loading, working, user, buildInfo, uuidPrefix, - isNotLinking, isLinkingPath, siteBanner }: MainPanelRootProps) => - loading + isNotLinking, isLinkingPath, siteBanner, sessionIdleTimeout, + sidePanelIsCollapsed, toggleSidePanel }: MainPanelRootProps) =>{ + return loading ? : <> - {isNotLinking && - {working ? : null} - } - - {user ? (user.isActive || (!user.isActive && isLinkingPath) ? : ) : } - - + {isNotLinking && + {working + ? + : null} + } + + {user + ? (user.isActive || (!user.isActive && isLinkingPath) + ? + : ) + : } + + + } );