File tree Expand file tree Collapse file tree 4 files changed +12
-7
lines changed
Expand file tree Collapse file tree 4 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 11ACCESS_TOKEN_COOKIE_NAME = edx-jwt-cookie-header-payload
22ACCOUNT_PROFILE_URL = http://localhost:1995
3- ACCOUNT_SETTINGS_LABEL =
43ACCOUNT_SETTINGS_URL = http://localhost:1997
54BASE_URL = localhost:8080
65CREDENTIALS_BASE_URL = http://localhost:18150
@@ -18,6 +17,7 @@ ORDER_HISTORY_URL=localhost:1996/orders
1817REFRESH_ACCESS_TOKEN_ENDPOINT = http://localhost:18000/login_refresh
1918SEGMENT_KEY = null
2019SHOW_FULLNAME = false
20+ SHOW_SETTINGS_LABEL = false
2121SITE_NAME = Open edX
2222USER_INFO_COOKIE_NAME = edx-user-info
2323LOGO_URL = https://edx-cdn.org/v3/default/logo.svg
Original file line number Diff line number Diff line change @@ -26,11 +26,11 @@ ensureConfig([
2626
2727subscribe ( APP_CONFIG_INITIALIZED , ( ) => {
2828 mergeConfig ( {
29- ACCOUNT_SETTINGS_LABEL : process . env . ACCOUNT_SETTINGS_LABEL ,
3029 AUTHN_MINIMAL_HEADER : ! ! process . env . AUTHN_MINIMAL_HEADER ,
3130 DASHBOARD_URL : process . env . DASHBOARD_URL ,
3231 EXTERNAL_ACCOUNT_PROFILE_URL : process . env . EXTERNAL_ACCOUNT_PROFILE_URL ,
3332 SHOW_FULLNAME : process . env . SHOW_FULLNAME ,
33+ SHOW_SETTINGS_LABEL : process . env . SHOW_SETTINGS_LABEL ,
3434 } , 'Header additional config' ) ;
3535} ) ;
3636
@@ -66,7 +66,7 @@ const Header = ({ intl }) => {
6666 {
6767 type : 'item' ,
6868 href : config . ACCOUNT_SETTINGS_URL ,
69- content : config . ACCOUNT_SETTINGS_LABEL ? config . ACCOUNT_SETTINGS_LABEL : intl . formatMessage ( messages [ 'header.user.menu.account.settings ' ] ) ,
69+ content : config . SHOW_SETTINGS_LABEL ? intl . formatMessage ( messages [ 'header.user.menu.settings' ] ) : intl . formatMessage ( messages [ 'header.user.menu.account' ] ) ,
7070 } ,
7171 {
7272 type : 'item' ,
Original file line number Diff line number Diff line change @@ -31,11 +31,16 @@ const messages = defineMessages({
3131 defaultMessage : 'Profile' ,
3232 description : 'Link to the user profile' ,
3333 } ,
34- 'header.user.menu.account.settings ' : {
35- id : 'header.user.menu.account.settings ' ,
34+ 'header.user.menu.account' : {
35+ id : 'header.user.menu.account' ,
3636 defaultMessage : 'Account' ,
3737 description : 'Link to account settings' ,
3838 } ,
39+ 'header.user.menu.settings' : {
40+ id : 'header.user.menu.settings' ,
41+ defaultMessage : 'Settings' ,
42+ description : 'Link to account settings' ,
43+ } ,
3944 'header.user.menu.order.history' : {
4045 id : 'header.user.menu.order.history' ,
4146 defaultMessage : 'Order History' ,
Original file line number Diff line number Diff line change @@ -28,11 +28,11 @@ const AuthenticatedUserDropdown = ({ intl, name }) => {
2828 </ Dropdown . Toggle >
2929 < Dropdown . Menu className = "dropdown-menu-right" >
3030 { dashboardMenuItem }
31- < Dropdown . Item href = { `${ getConfig ( ) . ACCOUNT_PROFILE_URL } /u/${ username } ` } >
31+ < Dropdown . Item href = { getConfig ( ) . EXTERNAL_ACCOUNT_PROFILE_URL ? getConfig ( ) . EXTERNAL_ACCOUNT_PROFILE_URL : `${ getConfig ( ) . ACCOUNT_PROFILE_URL } /u/${ username } ` } >
3232 { intl . formatMessage ( messages . profile ) }
3333 </ Dropdown . Item >
3434 < Dropdown . Item href = { getConfig ( ) . ACCOUNT_SETTINGS_URL } >
35- { intl . formatMessage ( messages . settings ) }
35+ { getConfig ( ) . SHOW_SETTINGS_LABEL ? intl . formatMessage ( messages . settings ) : intl . formatMessage ( messages . account ) }
3636 </ Dropdown . Item >
3737 { getConfig ( ) . ORDER_HISTORY_URL && (
3838 < Dropdown . Item href = { getConfig ( ) . ORDER_HISTORY_URL } >
You can’t perform that action at this time.
0 commit comments