X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/24cc808e44765268ddbcecbfed0645b09fe7777d..59cc1b248e39a17bbf46449add178d957b167b9a:/src/views/inactive-panel/inactive-panel.tsx diff --git a/src/views/inactive-panel/inactive-panel.tsx b/src/views/inactive-panel/inactive-panel.tsx index 5f045f69..42262deb 100644 --- a/src/views/inactive-panel/inactive-panel.tsx +++ b/src/views/inactive-panel/inactive-panel.tsx @@ -5,12 +5,11 @@ import * as React from 'react'; import { Dispatch } from 'redux'; import { connect } from 'react-redux'; -import { startLinking } from '~/store/link-account-panel/link-account-panel-actions'; import { Grid, Typography, Button } from '@material-ui/core'; import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles'; import { ArvadosTheme } from '~/common/custom-theme'; -import { LinkAccountType } from '~/models/link-account'; - +import { navigateToLinkAccount } from '~/store/navigation/navigation-action'; +import { RootState } from '~/store/store'; type CssRules = 'root' | 'ontop' | 'title'; @@ -43,34 +42,37 @@ export interface InactivePanelActionProps { } const mapDispatchToProps = (dispatch: Dispatch): InactivePanelActionProps => ({ - startLinking: () => dispatch(startLinking(LinkAccountType.ACCESS_OTHER_ACCOUNT)) + startLinking: () => { + dispatch(navigateToLinkAccount); + } }); -type InactivePanelProps = WithStyles & InactivePanelActionProps; +export interface InactivePanelStateProps { + inactivePageText: string; +} + +type InactivePanelProps = WithStyles & InactivePanelActionProps & InactivePanelStateProps; -export const InactivePanel = connect(null, mapDispatchToProps)(withStyles(styles)((({ classes, startLinking }: InactivePanelProps) => - - - - Hi! You're logged in, but... - - - - - Your account is inactive. An administrator must activate your account before you can get any further. - - - - - If you would like to use this login to access another account click "Link Account". - - - - - - - ))); +export const InactivePanel = connect((state: RootState) => ({ + inactivePageText: state.auth.config.clusterConfig.Workbench.InactivePageHTML +}), mapDispatchToProps)(withStyles(styles)((({ classes, startLinking, inactivePageText }: InactivePanelProps) => + + + +
+ + + + + If you would like to use this login to access another account click "Link Account". + + + + + + +)));