mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 16:24:45 -07:00
Webatrice: Add account validation dialog/form (#4547)
* Add account validation dialog/form * clean up * close registration dialog on token request * remove dupe code * add subtitle styling Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
This commit is contained in:
parent
513fcb0908
commit
1d780058c8
12 changed files with 200 additions and 16 deletions
|
|
@ -0,0 +1,13 @@
|
|||
.dialog-title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.MuiDialogTitle-root.dialog-title {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
import React from 'react';
|
||||
import Dialog from '@material-ui/core/Dialog';
|
||||
import DialogContent from '@material-ui/core/DialogContent';
|
||||
import DialogTitle from '@material-ui/core/DialogTitle';
|
||||
import IconButton from '@material-ui/core/IconButton';
|
||||
import CloseIcon from '@material-ui/icons/Close';
|
||||
import Typography from '@material-ui/core/Typography';
|
||||
|
||||
import { AccountActivationForm } from 'forms';
|
||||
|
||||
import './AccountActivationDialog.css';
|
||||
|
||||
const AccountActivationDialog = ({ classes, handleClose, isOpen, onSubmit }: any) => {
|
||||
const handleOnClose = () => {
|
||||
handleClose();
|
||||
}
|
||||
|
||||
return (
|
||||
<Dialog onClose={handleOnClose} open={isOpen}>
|
||||
<DialogTitle disableTypography className="dialog-title">
|
||||
<Typography variant="h6">Account Activation</Typography>
|
||||
|
||||
{handleOnClose ? (
|
||||
<IconButton onClick={handleOnClose}>
|
||||
<CloseIcon />
|
||||
</IconButton>
|
||||
) : null}
|
||||
</DialogTitle>
|
||||
<DialogContent>
|
||||
<div className="content">
|
||||
<Typography variant='subtitle1'>Your account has not been activated yet.</Typography>
|
||||
<Typography variant='subtitle1'>You need to provide the activation token received in the activation email.</Typography>
|
||||
</div>
|
||||
|
||||
<AccountActivationForm onSubmit={onSubmit}></AccountActivationForm>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
);
|
||||
};
|
||||
|
||||
export default AccountActivationDialog;
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
export { default as AccountActivationDialog } from './AccountActivationDialog/AccountActivationDialog';
|
||||
export { default as CardImportDialog } from './CardImportDialog/CardImportDialog';
|
||||
export { default as KnownHostDialog } from './KnownHostDialog/KnownHostDialog';
|
||||
export { default as RegistrationDialog } from './RegistrationDialog/RegistrationDialog';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue