diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f88ab2e6..7139e36a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -99,7 +99,7 @@ jobs: run: | cd src/main/frontend npm install --legacy-peer-deps - npm run-script build + npm run-script production-build - name: docker push run: | diff --git a/pom.xml b/pom.xml index 27c8d2fd..d255e260 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.springframework.boot spring-boot-starter-parent - 3.0.0 + 3.0.1 @@ -19,12 +19,12 @@ 17 - 1.7.21 + 1.7.22 1.33 1.13.2 2.18.24 - 1.6.11 + 2.0.0-alpha-3 1.0.0 2.27.2 1.3 @@ -48,13 +48,6 @@ spring-boot-starter-mail - - - javax.mail - mail - 1.4.7 - test - com.icegreen diff --git a/src/main/frontend/app/login/index.js b/src/main/frontend/app/login/LoginPage.js similarity index 67% rename from src/main/frontend/app/login/index.js rename to src/main/frontend/app/login/LoginPage.js index 91d6c026..a7980b52 100644 --- a/src/main/frontend/app/login/index.js +++ b/src/main/frontend/app/login/LoginPage.js @@ -1,14 +1,13 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; +import ReactDOM from "react-dom"; +import React from "react"; +import {Box, Divider, Grid, ThemeProvider} from "@mui/material"; import theme from "../component/styles"; import Template from "../component/Template"; import FormInputTextField from "../component/FormInputTextField"; +import {Fingerprint, Person} from "@mui/icons-material"; import Separator from "../component/Separator"; import FormButton from "../component/FormButton"; -import {HashRouter, Link} from "react-router-dom"; -import {Route, Routes, useNavigate} from "react-router"; -import {Box, Divider, Grid, ThemeProvider, Typography} from "@mui/material"; -import {Fingerprint, Person, VpnKey} from "@mui/icons-material"; + const VAuthenticatorTitle = () => { return } -const LoginMainPage = (props) => { - return ( - - - }/> - }/> - }/> - - ) -} - const Login = (props) => { const {rawFeatures} = props; @@ -109,7 +94,7 @@ const Login = (props) => {

are you not registered? if you want you can register here

let resetPasswordLink =
-

do you have forgot your password? please click here to recover +

do you have forgot your password? please click here to recover your password

@@ -158,80 +143,7 @@ const Login = (props) => { ) } - -const ResetPasswordChallengeSender = (props) => { - const [email, setEmail] = React.useState("") - let navigate = useNavigate(); - - const sentResetPasswordChallenge = (email) => { - return fetch(`/api/mail/${email}/rest-password-challenge`, { - method: "PUT", - credentials: 'same-origin' - }).then(r => { - if (r.status === 204) { - navigate("/reset-password-challenge-sent", {replace: true}); - } - }) - } - - return ( - - - - ) -} - -const SuccessfulResetPasswordMailChallenge = () => { - return ( - - - - ) -} - - if (document.getElementById('app')) { let features = document.getElementById('features').innerHTML - ReactDOM.render(, document.getElementById('app')); + ReactDOM.render(, document.getElementById('app')); } \ No newline at end of file diff --git a/src/main/frontend/app/reset-password/ResetPasswordChallengeSenderPage.js b/src/main/frontend/app/reset-password/ResetPasswordChallengeSenderPage.js new file mode 100644 index 00000000..1819ee24 --- /dev/null +++ b/src/main/frontend/app/reset-password/ResetPasswordChallengeSenderPage.js @@ -0,0 +1,63 @@ +import ReactDOM from "react-dom"; +import React from "react"; +import {Box, Divider, Grid, ThemeProvider, Typography} from "@mui/material"; +import theme from "../component/styles"; +import Template from "../component/Template"; +import {Person, VpnKey} from "@mui/icons-material"; +import FormInputTextField from "../component/FormInputTextField"; +import Separator from "../component/Separator"; +import FormButton from "../component/FormButton"; + + +const ResetPasswordChallengeSender = (props) => { + const [email, setEmail] = React.useState("") + + const sentResetPasswordChallenge = (email) => { + return fetch(`/api/mail/${email}/rest-password-challenge`, { + method: "PUT", + credentials: 'same-origin' + }).then(r => { + if (r.status === 204) { + window.location.href = "/reset-password/successful-reset-password-mail-challenge"; + } + }) + } + + return ( + + + + ) +} +if (document.getElementById('app')) { + let features = document.getElementById('features').innerHTML + ReactDOM.render(, document.getElementById('app')); +} \ No newline at end of file diff --git a/src/main/frontend/app/reset-password/reset-password.js b/src/main/frontend/app/reset-password/ResetPasswordPage.js similarity index 100% rename from src/main/frontend/app/reset-password/reset-password.js rename to src/main/frontend/app/reset-password/ResetPasswordPage.js diff --git a/src/main/frontend/app/reset-password/successful-password-reset.js b/src/main/frontend/app/reset-password/SuccessfulPasswordReset.js similarity index 100% rename from src/main/frontend/app/reset-password/successful-password-reset.js rename to src/main/frontend/app/reset-password/SuccessfulPasswordReset.js diff --git a/src/main/frontend/app/reset-password/SuccessfulResetPasswordMailChallengePage.js b/src/main/frontend/app/reset-password/SuccessfulResetPasswordMailChallengePage.js new file mode 100644 index 00000000..411ce047 --- /dev/null +++ b/src/main/frontend/app/reset-password/SuccessfulResetPasswordMailChallengePage.js @@ -0,0 +1,34 @@ +import ReactDOM from "react-dom"; +import React from "react"; +import {Divider, Grid, ThemeProvider, Typography} from "@mui/material"; +import theme from "../component/styles"; +import Template from "../component/Template"; +import {VpnKey} from "@mui/icons-material"; + + +const SuccessfulResetPasswordMailChallenge = () => { + return ( + + + + ) +} + + +if (document.getElementById('app')) { + let features = document.getElementById('features').innerHTML + ReactDOM.render(, document.getElementById('app')); +} \ No newline at end of file diff --git a/src/main/frontend/app/signup/SignUpPage.js b/src/main/frontend/app/signup/SignUpPage.js index da66f6d1..7514992c 100644 --- a/src/main/frontend/app/signup/SignUpPage.js +++ b/src/main/frontend/app/signup/SignUpPage.js @@ -4,12 +4,12 @@ import FormInputTextField from "../component/FormInputTextField"; import FormButton from "../component/FormButton"; import {signUp} from "./SignUpRepository"; -import {useNavigate} from "react-router"; import FormDatePicker, {ApiDateFormatPattern} from "../component/FormDatePicker"; import {Divider, Grid, ThemeProvider, Typography} from "@mui/material"; import {GroupAdd, VpnKey} from "@mui/icons-material"; import theme from "../component/styles"; import FormInputMask from "../component/FormInputMask"; +import {createRoot} from "react-dom/client"; const SignUpPage = () => { const [email, setEmail] = React.useState("") @@ -19,8 +19,6 @@ const SignUpPage = () => { const [birthDate, setBirthDate] = React.useState("") const [phone, setPhone] = React.useState("") - let navigate = useNavigate(); - return (