All about user login
Not runnable at the moment
This commit is contained in:
parent
fbb8f5799e
commit
d79bbad575
49 changed files with 1554 additions and 686 deletions
|
@ -7,20 +7,60 @@ import i18n from '../lib/i18n';
|
|||
|
||||
import { Section } from '../lib/page'
|
||||
import Account from './Account'
|
||||
import Login from './Login'
|
||||
import Reset from './Forgot'
|
||||
import ResetLink from './Reset'
|
||||
import API from './API'
|
||||
import mailtrainConfig from 'mailtrainConfig';
|
||||
|
||||
const getStructure = t => ({
|
||||
'': {
|
||||
title: t('Home'),
|
||||
externalLink: '/',
|
||||
children: {
|
||||
'account': {
|
||||
title: t('Account'),
|
||||
link: '/account',
|
||||
component: Account
|
||||
|
||||
const getStructure = t => {
|
||||
const subPaths = {
|
||||
'login': {
|
||||
title: t('Sign in'),
|
||||
link: '/account/login',
|
||||
component: Login,
|
||||
},
|
||||
'api': {
|
||||
title: t('API'),
|
||||
link: '/account/api',
|
||||
component: API
|
||||
}
|
||||
};
|
||||
|
||||
if (mailtrainConfig.isAuthMethodLocal) {
|
||||
subPaths.forgot = {
|
||||
title: t('Password reset'),
|
||||
params: [':username?'],
|
||||
link: '/account/forgot',
|
||||
component: Reset
|
||||
};
|
||||
|
||||
subPaths.reset = {
|
||||
title: t('Password reset'),
|
||||
params: [':username', ':resetToken'],
|
||||
link: '/account/reset',
|
||||
component: ResetLink
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
'': {
|
||||
title: t('Home'),
|
||||
externalLink: '/',
|
||||
children: {
|
||||
account: {
|
||||
title: t('Account'),
|
||||
link: '/account',
|
||||
component: Account,
|
||||
|
||||
children: subPaths
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
export default function() {
|
||||
ReactDOM.render(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue