feat: Account pages. Updated menu items urls.
This commit is contained in:
committed by
Adolfo R. Brandes
parent
536d67404f
commit
5ee8a8c75c
@@ -1,4 +1,6 @@
|
|||||||
ACCESS_TOKEN_COOKIE_NAME=edx-jwt-cookie-header-payload
|
ACCESS_TOKEN_COOKIE_NAME=edx-jwt-cookie-header-payload
|
||||||
|
ACCOUNT_PROFILE_URL=http://localhost:1995
|
||||||
|
ACCOUNT_SETTINGS_URL=http://localhost:1997
|
||||||
BASE_URL=localhost:8080
|
BASE_URL=localhost:8080
|
||||||
CREDENTIALS_BASE_URL=http://localhost:18150
|
CREDENTIALS_BASE_URL=http://localhost:18150
|
||||||
CSRF_TOKEN_API_PATH=/csrf/api/v1/token
|
CSRF_TOKEN_API_PATH=/csrf/api/v1/token
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ Environment Variables
|
|||||||
Defaults to "localhost" in development.
|
Defaults to "localhost" in development.
|
||||||
* ``LOGO_URL`` - The URL of the site's logo. This logo is displayed in the header.
|
* ``LOGO_URL`` - The URL of the site's logo. This logo is displayed in the header.
|
||||||
* ``ORDER_HISTORY_URL`` - The URL of the order history page.
|
* ``ORDER_HISTORY_URL`` - The URL of the order history page.
|
||||||
|
* ``ACCOUNT_PROFILE_URL`` - The URL of the account profile page.
|
||||||
|
* ``ACCOUNT_SETTINGS_URL`` - The URL of the account settings page.
|
||||||
* ``AUTHN_MINIMAL_HEADER`` - A boolean flag which hides the main menu, user menu, and logged-out
|
* ``AUTHN_MINIMAL_HEADER`` - A boolean flag which hides the main menu, user menu, and logged-out
|
||||||
menu items when truthy. This is intended to be used in micro-frontends like
|
menu items when truthy. This is intended to be used in micro-frontends like
|
||||||
frontend-app-authentication in which these menus are considered distractions from the user's task.
|
frontend-app-authentication in which these menus are considered distractions from the user's task.
|
||||||
|
|||||||
@@ -55,12 +55,12 @@ const Header = ({ intl }) => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'item',
|
type: 'item',
|
||||||
href: `${config.LMS_BASE_URL}/u/${authenticatedUser.username}`,
|
href: `${config.ACCOUNT_PROFILE_URL}/u/${authenticatedUser.username}`,
|
||||||
content: intl.formatMessage(messages['header.user.menu.profile']),
|
content: intl.formatMessage(messages['header.user.menu.profile']),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'item',
|
type: 'item',
|
||||||
href: `${config.LMS_BASE_URL}/account/settings`,
|
href: config.ACCOUNT_SETTINGS_URL,
|
||||||
content: intl.formatMessage(messages['header.user.menu.account.settings']),
|
content: intl.formatMessage(messages['header.user.menu.account.settings']),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,10 +29,10 @@ const AuthenticatedUserDropdown = ({ intl, username }) => {
|
|||||||
</Dropdown.Toggle>
|
</Dropdown.Toggle>
|
||||||
<Dropdown.Menu className="dropdown-menu-right">
|
<Dropdown.Menu className="dropdown-menu-right">
|
||||||
{dashboardMenuItem}
|
{dashboardMenuItem}
|
||||||
<Dropdown.Item href={`${getConfig().LMS_BASE_URL}/u/${username}`}>
|
<Dropdown.Item href={`${getConfig().ACCOUNT_PROFILE_URL}/u/${username}`}>
|
||||||
{intl.formatMessage(messages.profile)}
|
{intl.formatMessage(messages.profile)}
|
||||||
</Dropdown.Item>
|
</Dropdown.Item>
|
||||||
<Dropdown.Item href={`${getConfig().LMS_BASE_URL}/account/settings`}>
|
<Dropdown.Item href={getConfig().ACCOUNT_SETTINGS_URL}>
|
||||||
{intl.formatMessage(messages.account)}
|
{intl.formatMessage(messages.account)}
|
||||||
</Dropdown.Item>
|
</Dropdown.Item>
|
||||||
{ getConfig().ORDER_HISTORY_URL && (
|
{ getConfig().ORDER_HISTORY_URL && (
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ Enzyme.configure({ adapter: new Adapter() });
|
|||||||
// These configuration values are usually set in webpack's EnvironmentPlugin however
|
// These configuration values are usually set in webpack's EnvironmentPlugin however
|
||||||
// Jest does not use webpack so we need to set these so for testing
|
// Jest does not use webpack so we need to set these so for testing
|
||||||
process.env.ACCESS_TOKEN_COOKIE_NAME = 'edx-jwt-cookie-header-payload';
|
process.env.ACCESS_TOKEN_COOKIE_NAME = 'edx-jwt-cookie-header-payload';
|
||||||
|
process.env.ACCOUNT_PROFILE_URL = 'http://localhost:1995';
|
||||||
|
process.env.ACCOUNT_SETTINGS_URL = 'http://localhost:1997';
|
||||||
process.env.BASE_URL = 'localhost:1995';
|
process.env.BASE_URL = 'localhost:1995';
|
||||||
process.env.CREDENTIALS_BASE_URL = 'http://localhost:18150';
|
process.env.CREDENTIALS_BASE_URL = 'http://localhost:18150';
|
||||||
process.env.CSRF_TOKEN_API_PATH = '/csrf/api/v1/token';
|
process.env.CSRF_TOKEN_API_PATH = '/csrf/api/v1/token';
|
||||||
|
|||||||
Reference in New Issue
Block a user