mirror of
https://github.com/openziti/zrok.git
synced 2025-06-24 03:31:57 +02:00
add <Paper/> around floating text in forgot password and registration; fixed bad API calls in registration
This commit is contained in:
parent
66dbecc6b4
commit
9d054e4540
@ -1,4 +1,4 @@
|
||||
import {Box, Button, Container, TextField, Typography} from "@mui/material";
|
||||
import {Box, Button, Container, Paper, TextField, Typography} from "@mui/material";
|
||||
import zrokLogo from "./assets/zrok-1.0.0-rocket-purple.svg";
|
||||
import {Link} from "react-router";
|
||||
import {AccountApi} from "./api";
|
||||
@ -51,6 +51,7 @@ const ForgotPasswordForm = ({ doRequest }: ForgotPasswordFormProps) => {
|
||||
|
||||
const RequestSubmittedMessage = () => {
|
||||
return (
|
||||
<Paper sx={{ p: 5 }}>
|
||||
<Box component="div">
|
||||
<Typography component="div" align="center"><h2>Request Submitted...</h2></Typography>
|
||||
<Typography component="div">
|
||||
@ -67,6 +68,7 @@ const RequestSubmittedMessage = () => {
|
||||
<Link to="/">Return to Login</Link>
|
||||
</Box>
|
||||
</Box>
|
||||
</Paper>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Box, Button, Checkbox, Container, FormControlLabel, Grid2, TextField, Typography} from "@mui/material";
|
||||
import {Box, Button, Checkbox, Container, FormControlLabel, Grid2, Paper, TextField, Typography} from "@mui/material";
|
||||
import zrokLogo from "./assets/zrok-1.0.0-rocket-purple.svg";
|
||||
import {useParams} from "react-router";
|
||||
import {useFormik} from "formik";
|
||||
@ -95,6 +95,7 @@ interface RegistrationCompleteProps {
|
||||
|
||||
const RegistrationComplete = ({ token }: RegistrationCompleteProps) => {
|
||||
return (
|
||||
<Paper sx={{ p: 5 }}>
|
||||
<Box component="div">
|
||||
<Container>
|
||||
<Box sx={{ display: "flex", alignItems: "center" }}>
|
||||
@ -147,11 +148,13 @@ const RegistrationComplete = ({ token }: RegistrationCompleteProps) => {
|
||||
</Box>
|
||||
</Container>
|
||||
</Box>
|
||||
</Paper>
|
||||
);
|
||||
}
|
||||
|
||||
const InvalidToken = () => {
|
||||
return (
|
||||
<Paper sx={{ p: 5 }}>
|
||||
<Box component="div">
|
||||
<Container>
|
||||
<Box sx={{ display: "flex", alignItems: "center" }}>
|
||||
@ -172,6 +175,7 @@ const InvalidToken = () => {
|
||||
</Box>
|
||||
</Container>
|
||||
</Box>
|
||||
</Paper>
|
||||
);
|
||||
}
|
||||
|
||||
@ -183,7 +187,7 @@ const Register = () => {
|
||||
const [touLink, setTouLink] = useState<string>();
|
||||
|
||||
const doRegistration = (v) => {
|
||||
new AccountApi().register({body: {token: regToken, password: v.password}})
|
||||
new AccountApi().register({body: {registerToken: regToken, password: v.password}})
|
||||
.then(d => {
|
||||
console.log(d);
|
||||
setComponent(<RegistrationComplete token={d.accountToken!} />);
|
||||
@ -195,7 +199,7 @@ const Register = () => {
|
||||
|
||||
useEffect(() => {
|
||||
if(regToken) {
|
||||
new AccountApi().verify({body: {registrationToken: regToken}})
|
||||
new AccountApi().verify({body: {registerToken: regToken}})
|
||||
.then((d) => {
|
||||
console.log(d);
|
||||
setEmail(d.email);
|
||||
|
Loading…
x
Reference in New Issue
Block a user