diff --git a/packages/auth/src/pages/SigninPage.tsx b/packages/auth/src/pages/SigninPage.tsx index ca13c54eedb..2a2530b9e5e 100644 --- a/packages/auth/src/pages/SigninPage.tsx +++ b/packages/auth/src/pages/SigninPage.tsx @@ -4,29 +4,19 @@ import React, { useState, } from 'react' -import { useRouter } from '@keystone-6/core/admin-ui/router' import { Button } from '@keystar/ui/button' +import { Grid, HStack, VStack } from '@keystar/ui/layout' +import { Notice } from '@keystar/ui/notice' +import { PasswordField } from '@keystar/ui/password-field' +import { Content } from '@keystar/ui/slots' import { TextField } from '@keystar/ui/text-field' -import { - Box, - VStack, -} from '@keystar/ui/layout' -import { - Heading, - Text, -} from '@keystar/ui/typography' - -import { - useMutation, - gql -} from '@keystone-6/core/admin-ui/apollo' -import { - GraphQLErrorNotice, -} from '@keystone-6/core/admin-ui/components' - -import type { - AuthGqlNames, -} from '../types' +import { Heading, Text } from '@keystar/ui/typography' + +import { gql, useMutation } from '@keystone-6/core/admin-ui/apollo' +import { GraphQLErrorNotice, Logo } from '@keystone-6/core/admin-ui/components' +import { useRouter } from '@keystone-6/core/admin-ui/router' + +import type { AuthGqlNames } from '../types' export default (props: Parameters[0]) => () => @@ -83,53 +73,87 @@ function SigninPage ({ const pending = loading || data?.authenticate?.__typename === successTypename return ( - + <> Keystone - Sign in - - - Sign in + + + + + + + Sign in + - {/* TODO: FIXME, use notice */ data?.authenticate?.__typename === failureTypename && ( - - {data?.authenticate.message} - + + {data?.authenticate?.__typename === failureTypename && ( + + + + {data?.authenticate.message} + + + )} -
- - setState({ ...state, identity: v })} - placeholder={identityField} - /> - setState({ ...state, secret: v })} - placeholder={secretField} - /> - - -
-
-
-
+ + + setState({ ...state, identity: v })} + value={state.identity} + /> + setState({ ...state, secret: v })} + type='password' + value={state.secret} + /> + + + + + + ) } + +function capitalizeFirstLetter (value: string) { + return value.charAt(0).toUpperCase() + value.slice(1) +}