X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/99a99d1b9da187562407aebe144ac8140603d684..b676312f840c3f12855a4392afe90b275dd25b97:/src/views/main-panel/main-panel.tsx diff --git a/src/views/main-panel/main-panel.tsx b/src/views/main-panel/main-panel.tsx index dab4533fa3..fac3da6715 100644 --- a/src/views/main-panel/main-panel.tsx +++ b/src/views/main-panel/main-panel.tsx @@ -2,13 +2,15 @@ // // SPDX-License-Identifier: AGPL-3.0 -import { RootState } from '~/store/store'; +import { RootState } from 'store/store'; import { connect } from 'react-redux'; -import { MainPanelRoot, MainPanelRootDataProps } from '~/views/main-panel/main-panel-root'; -import { isSystemWorking } from '~/store/progress-indicator/progress-indicator-reducer'; -import { isWorkbenchLoading } from '~/store/workbench/workbench-actions'; -import { LinkAccountPanelStatus } from '~/store/link-account-panel/link-account-panel-reducer'; -import { matchLinkAccountRoute } from '~/routes/routes'; +import parse from 'parse-duration'; +import { MainPanelRoot, MainPanelRootDataProps } from 'views/main-panel/main-panel-root'; +import { isSystemWorking } from 'store/progress-indicator/progress-indicator-reducer'; +import { isWorkbenchLoading } from 'store/workbench/workbench-actions'; +import { LinkAccountPanelStatus } from 'store/link-account-panel/link-account-panel-reducer'; +import { matchLinkAccountRoute } from 'routes/routes'; +import { toggleSidePanel } from "store/side-panel/side-panel-action"; const mapStateToProps = (state: RootState): MainPanelRootDataProps => { return { @@ -19,10 +21,18 @@ const mapStateToProps = (state: RootState): MainPanelRootDataProps => { uuidPrefix: state.auth.localCluster, isNotLinking: state.linkAccountPanel.status === LinkAccountPanelStatus.NONE || state.linkAccountPanel.status === LinkAccountPanelStatus.INITIAL, isLinkingPath: state.router.location ? matchLinkAccountRoute(state.router.location.pathname) !== null : false, - siteBanner: state.config.clusterConfig.Workbench.SiteName + siteBanner: state.auth.config.clusterConfig.Workbench.SiteName, + sessionIdleTimeout: parse(state.auth.config.clusterConfig.Workbench.IdleTimeout, 's') || 0, + sidePanelIsCollapsed: state.sidePanel.collapsedState, }; }; -const mapDispatchToProps = null; +const mapDispatchToProps = (dispatch) => { + return { + toggleSidePanel: (collapsedState)=>{ + return dispatch(toggleSidePanel(collapsedState)) + } + } +}; export const MainPanel = connect(mapStateToProps, mapDispatchToProps)(MainPanelRoot);