1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import * as React from 'react';
6 import { compose } from 'redux';
7 import { connect, DispatchProp } from 'react-redux';
8 import { Grid, Typography, Button } from '@material-ui/core';
9 import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles';
10 import { login } from '~/store/auth/auth-action';
11 import { ArvadosTheme } from '~/common/custom-theme';
12 import * as classNames from 'classnames';
14 type CssRules = 'root' | 'container' | 'title' | 'content' | 'content__bolder' | 'button';
16 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
18 background: theme.palette.background.default
24 marginBottom: theme.spacing.unit * 6,
25 color: theme.palette.grey["800"]
28 marginBottom: theme.spacing.unit * 3,
30 color: theme.palette.grey["800"]
40 type LoginPanelProps = DispatchProp<any> & WithStyles<CssRules>;
42 export const LoginPanel = compose(
45 )(({ classes, dispatch }: LoginPanelProps) =>
46 <Grid container direction="column" item xs alignItems="center" justify="center" className={classes.root}>
47 <Grid item className={classes.container}>
48 <Typography variant="title" align="center" className={classes.title}>
49 Welcome to the Arvados Wrokbench
51 <Typography variant="body1" className={classes.content}>
52 The "Log in" button below will show you a Google sign-in page.
53 After you assure Google that you want to log in here with your Google account,
54 you will be redirected back here to Arvados Workbench.
56 <Typography variant="body1" className={classes.content}>
57 If you have never used Arvados Workbench before, logging in for the first time will automatically create a new account.
59 <Typography variant="body2" className={classNames(classes.content, classes.content__bolder)}>
60 IMPORTANT: Please keep in mind to store exploratory data only but not any information used for clinical decision making.
62 <Typography variant="body1" className={classes.content}>
63 Arvados Workbench uses your name and email address only for identification, and does not retrieve any other personal information from Google.
65 <Typography component="div" align="right">
66 <Button variant="contained" color="primary" className={classes.button} onClick={() => dispatch(login())}>