Some refactoring to aling it more with IVIS and coreui theme.
This commit is contained in:
parent
397f85dac4
commit
c1731bf09f
50 changed files with 1427 additions and 2351 deletions
|
|
@ -1,51 +1,27 @@
|
|||
'use strict';
|
||||
|
||||
import React from 'react';
|
||||
import Account from './Account';
|
||||
import Login from './Login';
|
||||
import Reset from './Forgot';
|
||||
import ResetLink from './Reset';
|
||||
import API from './API';
|
||||
import mailtrainConfig from 'mailtrainConfig';
|
||||
import React
|
||||
from 'react';
|
||||
import Account
|
||||
from './Account';
|
||||
import API
|
||||
from './API';
|
||||
|
||||
|
||||
function getMenus(t) {
|
||||
const subPaths = {
|
||||
login: {
|
||||
title: t('signIn'),
|
||||
link: '/account/login',
|
||||
panelComponent: Login,
|
||||
},
|
||||
api: {
|
||||
title: t('api'),
|
||||
link: '/account/api',
|
||||
panelComponent: API
|
||||
}
|
||||
};
|
||||
|
||||
if (mailtrainConfig.isAuthMethodLocal) {
|
||||
subPaths.forgot = {
|
||||
title: t('passwordReset-1'),
|
||||
extraParams: [':username?'],
|
||||
link: '/account/forgot',
|
||||
panelComponent: Reset
|
||||
};
|
||||
|
||||
subPaths.reset = {
|
||||
title: t('passwordReset-1'),
|
||||
extraParams: [':username', ':resetToken'],
|
||||
link: '/account/reset',
|
||||
panelComponent: ResetLink
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
'account': {
|
||||
title: t('account'),
|
||||
link: '/account',
|
||||
panelComponent: Account,
|
||||
|
||||
children: subPaths
|
||||
children: {
|
||||
api: {
|
||||
title: t('api'),
|
||||
link: '/account/api',
|
||||
panelComponent: API
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue