-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Registration design changes #1517
Changes from all commits
62c29f1
7e00063
a1548dd
19b8889
02a2589
56de471
525155b
563d99f
c5bacc9
6e9f26c
aae2b61
bea93b7
06c8cf4
8406324
743bbec
660e3de
ce978f4
6cdf3fc
dc4be5f
4dddea9
e03b679
b3ac43e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { LinearProgress, Stack, Typography } from '@mui/material'; | ||
import { useIntl } from 'react-intl'; | ||
import { RegistrationProgressProps } from './types'; | ||
|
||
const totalSteps = 2; | ||
|
||
function RegistrationProgress({ | ||
loading, | ||
status, | ||
step, | ||
}: RegistrationProgressProps) { | ||
const intl = useIntl(); | ||
|
||
if (status === 'outdated') { | ||
return null; | ||
} | ||
|
||
return ( | ||
<Stack sx={{ pb: 1, width: '100%' }}> | ||
<Typography> | ||
{intl.formatMessage( | ||
{ id: 'login.progress.indicator' }, | ||
{ | ||
step, | ||
totalSteps, | ||
} | ||
)} | ||
</Typography> | ||
<LinearProgress | ||
variant={loading ? 'indeterminate' : 'determinate'} | ||
value={Math.floor(((step - 1) / totalSteps) * 100)} | ||
/> | ||
</Stack> | ||
); | ||
} | ||
|
||
export default RegistrationProgress; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { DirectiveStates } from 'directives/types'; | ||
|
||
export interface RegistrationProgressProps { | ||
status: DirectiveStates; | ||
step: 1 | 2; | ||
loading?: boolean; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -328,6 +328,20 @@ export const editorToolBarSx: SxProps<Theme> = { | |
alignItems: 'center', | ||
}; | ||
|
||
export const hiddenButAccessibleInput: SxProps<Theme> = { | ||
position: 'fixed', | ||
opacity: 0, | ||
pointerEvents: 'none', | ||
}; | ||
|
||
export const hiddenButAccessibleRadio: SxProps<Theme> = { | ||
'& .MuiRadio-root, & .MuiRadio-root input': { | ||
position: 'fixed', | ||
opacity: 0, | ||
pointerEvents: 'none', | ||
}, | ||
}; | ||
Comment on lines
+337
to
+343
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is kinda here because of spreading |
||
|
||
export const defaultBoxShadow = | ||
'rgb(50 50 93 / 7%) 0px 3px 6px -1px, rgb(0 0 0 / 10%) 0px -2px 4px -1px, rgb(0 0 0 / 10%) 0px 2px 4px -1px'; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { Button, Toolbar } from '@mui/material'; | ||
import SafeLoadingButton from 'components/SafeLoadingButton'; | ||
import { supabaseClient } from 'context/GlobalProviders'; | ||
import { useIntl } from 'react-intl'; | ||
import { ActionsProps } from './types'; | ||
|
||
const Actions = ({ primaryMessageId, saving }: ActionsProps) => { | ||
const intl = useIntl(); | ||
|
||
return ( | ||
<Toolbar | ||
disableGutters | ||
sx={{ | ||
justifyContent: 'space-between', | ||
width: '100%', | ||
}} | ||
> | ||
<Button | ||
disabled={saving} | ||
variant="outlined" | ||
onClick={async () => { | ||
await supabaseClient.auth.signOut(); | ||
}} | ||
> | ||
{intl.formatMessage({ id: 'cta.cancel' })} | ||
</Button> | ||
<SafeLoadingButton | ||
type="submit" | ||
variant="contained" | ||
loading={saving} | ||
disabled={saving} | ||
> | ||
{intl.formatMessage({ | ||
id: primaryMessageId, | ||
})} | ||
</SafeLoadingButton> | ||
</Toolbar> | ||
); | ||
}; | ||
|
||
export default Actions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually we're going to have a grid on all the login pages so using it here to make sure it works.