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) => ({
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>;
54 export const LoginPanel = compose(
57 )(({ classes, dispatch }: LoginPanelProps) =>
58 <Grid container direction="column" item xs alignItems="center" justify="center" className={classes.root}>
59 <Grid item className={classes.container}>
60 <Typography variant="title" align="center" className={classes.title}>
61 Welcome to the Arvados Wrokbench
63 <Typography variant="body1" className={classes.content}>
64 The "Log in" button below will show you a Google sign-in page.
65 After you assure Google that you want to log in here with your Google account, you will be redirected back here to Arvados Workbench.
67 <Typography variant="body1" className={classes.content}>
68 If you have never used Arvados Workbench before, logging in for the first time will automatically create a new account.
70 <Typography variant="body2" className={classNames(classes.content, classes.content__bolder)}>
71 IMPORTANT: Please keep in mind to store exploratory data only but not any information used for clinical decision making.
73 <Typography variant="body1" className={classes.content}>
74 Arvados Workbench uses your name and email address only for identification, and does not retrieve any other personal information from Google.
76 <Typography component="div" align="right">
77 <Button variant="contained" color="primary" className={classes.button} onClick={() => dispatch(login())}>