X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/3641a3638123f272b97cf313a1a1a4d890741383..72ee613468c6dee53b98ed1469ce9781a942dbe9:/src/views/login-panel/login-panel.tsx diff --git a/src/views/login-panel/login-panel.tsx b/src/views/login-panel/login-panel.tsx index 2928a94e..6fe3eee2 100644 --- a/src/views/login-panel/login-panel.tsx +++ b/src/views/login-panel/login-panel.tsx @@ -4,11 +4,11 @@ import * as React from 'react'; import { connect, DispatchProp } from 'react-redux'; -import { Grid, Typography, Button } from '@material-ui/core'; +import { Grid, Typography, Button, Select } from '@material-ui/core'; import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles'; -import { login } from '~/store/auth/auth-action'; +import { login, authActions } from '~/store/auth/auth-action'; import { ArvadosTheme } from '~/common/custom-theme'; -import * as classNames from 'classnames'; +import { RootState } from '~/store/store'; type CssRules = 'root' | 'container' | 'title' | 'content' | 'content__bolder' | 'button'; @@ -23,7 +23,6 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ left: 0, bottom: 0, right: 0, - background: 'url("arvados-logo-big.png") no-repeat center center', opacity: 0.2, } }, @@ -48,33 +47,47 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ } }); -type LoginPanelProps = DispatchProp & WithStyles; +type LoginPanelProps = DispatchProp & WithStyles & { + remoteHosts: { [key: string]: string }, + homeCluster: string, + uuidPrefix: string, + loginCluster: string, + welcomePage: string +}; -export const LoginPanel = withStyles(styles)(connect()( - ({ classes, dispatch }: LoginPanelProps) => - - - - Welcome to the Arvados Wrokbench - - - The "Log in" button below will show you a Google sign-in page. - After you assure Google that you want to log in here with your Google account, you will be redirected back here to Arvados Workbench. - - - If you have never used Arvados Workbench before, logging in for the first time will automatically create a new account. - - - IMPORTANT: Please keep in mind to store exploratory data only but not any information used for clinical decision making. - - - Arvados Workbench uses your name and email address only for identification, and does not retrieve any other personal information from Google. - - - - - - -)); +export const LoginPanel = withStyles(styles)( + connect((state: RootState) => ({ + remoteHosts: state.auth.remoteHosts, + homeCluster: state.auth.homeCluster, + uuidPrefix: state.auth.localCluster, + loginCluster: state.auth.loginCluster, + welcomePage: state.auth.config.clusterConfig.Workbench.WelcomePageHTML + }))(({ classes, dispatch, remoteHosts, homeCluster, uuidPrefix, loginCluster, welcomePage }: LoginPanelProps) => + + + +
+ + {Object.keys(remoteHosts).length > 1 && loginCluster === "" && + + + + + } + + + + + + + ));