mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-12-23 04:03:47 +01:00
Change URLs format
This commit is contained in:
parent
bec0c7998c
commit
ff5859a704
@ -54,17 +54,17 @@ const App = () => {
|
||||
<Router>
|
||||
<Switch>
|
||||
<Route exact path="/">
|
||||
<Redirect to="/c/login" />
|
||||
<Redirect to="/c/view/login" />
|
||||
</Route>
|
||||
<Route path="/c/login" component={LoginPage} />
|
||||
<Route path="/c/user/registration">
|
||||
<Route path="/c/view/login" component={LoginPage} />
|
||||
<Route path="/c/view/registration">
|
||||
<RegistationPage service={service} />
|
||||
</Route>
|
||||
<Route path="/c/user/registrationSuccess" component={RegistrationSuccessPage} />
|
||||
<Route path="/c/user/resetPassword">
|
||||
<Route path="/c/view/registration-success" component={RegistrationSuccessPage} />
|
||||
<Route path="/c/view/forgot-password">
|
||||
<ForgotPasswordPage service={service} />
|
||||
</Route>
|
||||
<Route path="/c/user/forgotPasswordSuccess" component={ForgotPasswordSuccessPage} />
|
||||
<Route path="/c/view/forgot-password-success" component={ForgotPasswordSuccessPage} />
|
||||
</Switch>
|
||||
</Router>
|
||||
</IntlProvider>
|
||||
|
@ -32,8 +32,11 @@ const ForgotPassword = (props: ServiceProps) => {
|
||||
// Call Service ...
|
||||
props.service.resetPassword(
|
||||
email,
|
||||
() => history.push("/c/user/forgotPasswordSuccess"),
|
||||
(msg) => { setErrorMsg(msg); setDisableButton(false); }
|
||||
() => history.push("/c/view/forgot-password-success"),
|
||||
(msg) => {
|
||||
setErrorMsg(msg);
|
||||
setDisableButton(false);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ class Header extends React.Component<HeaderProps, HeaderProps> {
|
||||
return (
|
||||
<StyledNav>
|
||||
<StyledDiv>
|
||||
<Logo><Link to="/" className="header-logo"><img src={String(logo)} alt="logo" /></Link></Logo>
|
||||
<Logo><Link to="/c/view/login" className="header-logo"><img src={String(logo)} alt="logo" /></Link></Logo>
|
||||
{text}
|
||||
{signUpButton}
|
||||
{signInButton}
|
||||
@ -57,7 +57,7 @@ const SignInButton = (props: ButtonProps) => {
|
||||
const style = props.style ? props.style : 'style1';
|
||||
return (
|
||||
<span className={`button-${style} ${props.className}`}>
|
||||
<Link to="/c/login"><FormattedMessage id="login.signin" defaultMessage="Sign In" /></Link>
|
||||
<Link to="/c/view/login"><FormattedMessage id="login.signin" defaultMessage="Sign In" /></Link>
|
||||
</span>);
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ const SignUpButton = (props: ButtonProps) => {
|
||||
const style = props.style ? props.style : 'style1';
|
||||
return (
|
||||
<span className={`button-${style} ${props.className}`}>
|
||||
<Link to="/c/user/registration"><FormattedMessage id="login.signup" defaultMessage="Sign Up" /></Link>
|
||||
<Link to="/c/view/registration"><FormattedMessage id="login.signup" defaultMessage="Sign Up" /></Link>
|
||||
</span>);
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ const LoginPage = () => {
|
||||
</div>
|
||||
<SubmitButton value={intl.formatMessage({ id: "login.signin", defaultMessage: "Sign In" })} />
|
||||
</form>
|
||||
<Link to="/c/user/resetPassword"><FormattedMessage id="login.forgotpwd" defaultMessage="Forgot Password ?" /></Link>
|
||||
<Link to="/c/view/forgot-password"><FormattedMessage id="login.forgotpwd" defaultMessage="Forgot Password ?" /></Link>
|
||||
|
||||
<ConfigStatusMessage enabled='false' />
|
||||
|
||||
|
@ -41,7 +41,7 @@ const RegistrationForm = (props: ServiceProps) => {
|
||||
// Call Service ...
|
||||
props.service.registerNewUser(
|
||||
user,
|
||||
() => history.push("/c/user/registrationSuccess"),
|
||||
() => history.push("/c/view/registration-success"),
|
||||
(msg) => { setErrorMsg(msg); setDisableButton(false); }
|
||||
);
|
||||
}
|
||||
|
@ -16,7 +16,6 @@ const RegistrationSuccessPage = () => {
|
||||
return (
|
||||
<div>
|
||||
<Header type='none' />
|
||||
<div>
|
||||
<PageContent>
|
||||
<h1>
|
||||
<FormattedMessage id="resetpassword.success.title" defaultMessage="Your account has been created successfully" />
|
||||
@ -24,10 +23,8 @@ const RegistrationSuccessPage = () => {
|
||||
<p>
|
||||
<FormattedMessage id="registration.success.desc" defaultMessage="Click 'Sign In' button below and start creating mind maps." />
|
||||
</p>
|
||||
|
||||
<SignInButton style='style1' />
|
||||
</PageContent>
|
||||
</div>
|
||||
<Footer />
|
||||
</div>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user