diff --git a/.env.development b/.env.development deleted file mode 100644 index 8dddff8c57..0000000000 --- a/.env.development +++ /dev/null @@ -1,24 +0,0 @@ -ACCESS_TOKEN_COOKIE_NAME=edx-jwt-cookie-header-payload -BASE_URL=localhost:8080 -CREDENTIALS_BASE_URL=http://localhost:18150 -CSRF_TOKEN_API_PATH=/csrf/api/v1/token -ECOMMERCE_BASE_URL=http://localhost:18130 -LANGUAGE_PREFERENCE_COOKIE_NAME=openedx-language-preference -LMS_BASE_URL=http://localhost:18000 -LOGIN_URL=http://localhost:18000/login -LOGOUT_URL=http://localhost:18000/login -MARKETING_SITE_BASE_URL=http://localhost:18000 -TERMS_OF_SERVICE_URL=null -PRIVACY_POLICY_URL=null -SUPPORT_EMAIL=null -STUDIO_BASE_URL=http://localhost:18010 -ENABLE_ACCESSIBILITY_PAGE=false -ORDER_HISTORY_URL=localhost:1996/orders -REFRESH_ACCESS_TOKEN_ENDPOINT=http://localhost:18000/login_refresh -SEGMENT_KEY=null -SITE_NAME=Open edX -USER_INFO_COOKIE_NAME=edx-user-info -LOGO_URL=https://edx-cdn.org/v3/default/logo.svg -LOGO_TRADEMARK_URL=https://edx-cdn.org/v3/default/logo-trademark.svg -LOGO_WHITE_URL=https://edx-cdn.org/v3/default/logo-white.svg -FAVICON_URL=https://edx-cdn.org/v3/default/favicon.ico diff --git a/env.config.jsx b/env.config.jsx new file mode 100644 index 0000000000..f0b337fa6c --- /dev/null +++ b/env.config.jsx @@ -0,0 +1,70 @@ +// eslint-disable-next-line no-unused-vars", + +import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework'; + +const OpenCraftFooter = () => ( + <> + + > +) + +const config = { + ACCESS_TOKEN_COOKIE_NAME: 'edx-jwt-cookie-header-payload', + ACCOUNT_PROFILE_URL: "http://local.openedx.io:1995", + ACCOUNT_SETTINGS_URL: "http://local.openedx.io:1997", + BASE_URL: "local.openedx.io:8080", + CREDENTIALS_BASE_URL: "http://local.openedx.io:18150", + CSRF_TOKEN_API_PATH: "/csrf/api/v1/token", + ECOMMERCE_BASE_URL: "http://local.openedx.io:18130", + LANGUAGE_PREFERENCE_COOKIE_NAME: "openedx-language-preference", + LMS_BASE_URL: "http://local.openedx.io:8000", + STUDIO_BASE_URL: "http://studio.local.openedx.io:8001", + LOGIN_URL: "http://local.openedx.io:8000/login", + LOGOUT_URL: "http://local.openedx.io:8000/logout", + MARKETING_SITE_BASE_URL: "http://local.openedx.io:8000", + ORDER_HISTORY_URL: "localhost:1996/orders", + REFRESH_ACCESS_TOKEN_ENDPOINT: "http://local.openedx.io:8000/login_refresh", + SEGMENT_KEY: "null", + SITE_NAME: "Open edX", + USER_INFO_COOKIE_NAME: "edx-user-info", + LOGO_URL: "/brand-openedx/logo.svg", + LOGO_TRADEMARK_URL: "/brand-openedx/logo-trademark.svg", + LOGO_WHITE_URL: "/brand-openedx/logo-white.svg", + FAVICON_URL: "https://edx-cdn.org/v3/default/favicon.ico", + pluginSlots: { + 'org.openedx.frontend.layout.footer.v1': { + plugins: [ + { + // Hide the default footer + op: PLUGIN_OPERATIONS.Hide, + widgetId: 'default_contents', + }, + { + // Insert a custom footer + op: PLUGIN_OPERATIONS.Insert, + widget: { + id: 'custom_footer', + type: DIRECT_PLUGIN, + RenderWidget: OpenCraftFooter, + }, + }, + ] + } + }, +}; + +export default config; diff --git a/example/index.jsx b/example/index.jsx index 580fccc1b7..747c57cdd7 100644 --- a/example/index.jsx +++ b/example/index.jsx @@ -4,9 +4,9 @@ import React from 'react'; import ReactDOM from 'react-dom'; import { initialize, getConfig, subscribe, APP_READY } from '@edx/frontend-platform'; import { AppContext, AppProvider } from '@edx/frontend-platform/react'; -import Footer from '@edx/frontend-component-footer'; import './index.scss'; +import FooterSlot from '../src/plugin-slots/FooterSlot'; subscribe(APP_READY, () => { ReactDOM.render( @@ -15,7 +15,7 @@ subscribe(APP_READY, () => { authenticatedUser: null, config: getConfig(), }}> -