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 } from '@material-ui/core';
8 import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles';
9 import { login } from '~/store/auth/auth-action';
10 import { ArvadosTheme } from '~/common/custom-theme';
11 import * as classNames from 'classnames';
13 type CssRules = 'root' | 'container' | 'title' | 'content' | 'content__bolder' | 'button';
15 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
18 backgroundColor: theme.palette.grey["200"],
26 background: 'url("arvados-logo-big.png") no-repeat center center',
35 marginBottom: theme.spacing.unit * 6,
36 color: theme.palette.grey["800"]
39 marginBottom: theme.spacing.unit * 3,
41 color: theme.palette.grey["800"]
51 type LoginPanelProps = DispatchProp<any> & WithStyles<CssRules>;
53 export const LoginPanel = withStyles(styles)(connect()(
54 ({ classes, dispatch }: LoginPanelProps) =>
55 <Grid container direction="column" item xs alignItems="center" justify="center" className={classes.root}>
56 <Grid item className={classes.container}>
57 <Typography variant="title" align="center" className={classes.title}>
58 Welcome to the Arvados Workbench
60 <Typography variant="body1" className={classes.content}>
61 The "Log in" button below will show you a Google sign-in page.
62 After you assure Google that you want to log in here with your Google account, you will be redirected back here to Arvados Workbench.
64 <Typography variant="body1" className={classes.content}>
65 If you have never used Arvados Workbench before, logging in for the first time will automatically create a new account.
67 <Typography variant="body2" className={classNames(classes.content, classes.content__bolder)}>
68 IMPORTANT: Please keep in mind to store exploratory data only but not any information used for clinical decision making.
70 <Typography variant="body1" className={classes.content}>
71 Arvados Workbench uses your name and email address only for identification, and does not retrieve any other personal information from Google.
73 <Typography component="div" align="right">
74 <Button variant="contained" color="primary" className={classes.button} onClick={() => dispatch(login())}>