1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import * as React from 'react';
6 import { connect, DispatchProp } from 'react-redux';
7 import { Grid, Typography, Button, Select } from '@material-ui/core';
8 import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles';
9 import { login, authActions } from '~/store/auth/auth-action';
10 import { ArvadosTheme } from '~/common/custom-theme';
11 import { RootState } from '~/store/store';
12 import * as classNames from 'classnames';
14 type CssRules = 'root' | 'container' | 'title' | 'content' | 'content__bolder' | 'button';
16 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
19 backgroundColor: theme.palette.grey["200"],
27 background: 'url("arvados-logo-big.png") no-repeat center center',
36 marginBottom: theme.spacing.unit * 6,
37 color: theme.palette.grey["800"]
40 marginBottom: theme.spacing.unit * 3,
42 color: theme.palette.grey["800"]
52 type LoginPanelProps = DispatchProp<any> & WithStyles<CssRules> & {
53 remoteHosts: { [key: string]: string },
58 export const InactivePanel = withStyles(styles)(
59 connect((state: RootState) => ({
60 remoteHosts: state.auth.remoteHosts,
61 homeCluster: state.auth.homeCluster,
62 uuidPrefix: state.auth.localCluster
63 }))(({ classes, dispatch, remoteHosts, homeCluster, uuidPrefix }: LoginPanelProps) =>
64 <Grid container justify="center" alignItems="center"
65 className={classes.root}
66 style={{ marginTop: 56, overflowY: "auto", height: "100%" }}>
67 <Grid item className={classes.container}>
68 <Typography variant='h6' align="center" className={classes.title}>
69 Hi! You're logged in, but...
72 Your account is inactive.
74 An administrator must activate your account before you can get any further.