@@ -114,6 +114,7 @@ def _override_openedx_docker_image(
114114 "profile" ,
115115 "account" ,
116116 "discussions" ,
117+ "authoring" ,
117118]
118119
119120for mfe in indigo_styled_mfes :
@@ -135,48 +136,6 @@ def _override_openedx_docker_image(
135136 )
136137)
137138
138- # Include js file in lms main.html, main_django.html, and certificate.html
139-
140- hooks .Filters .ENV_PATCHES .add_items (
141- [
142- # for production
143- (
144- "openedx-common-assets-settings" ,
145- """
146- javascript_files = ['base_application', 'application', 'certificates_wv']
147- dark_theme_filepath = ['indigo/js/dark-theme.js']
148-
149- for filename in javascript_files:
150- if filename in PIPELINE['JAVASCRIPT']:
151- PIPELINE['JAVASCRIPT'][filename]['source_filenames'] += dark_theme_filepath
152- """ ,
153- ),
154- # for development
155- (
156- "openedx-lms-development-settings" ,
157- """
158- javascript_files = ['base_application', 'application', 'certificates_wv']
159- dark_theme_filepath = ['indigo/js/dark-theme.js']
160-
161- for filename in javascript_files:
162- if filename in PIPELINE['JAVASCRIPT']:
163- PIPELINE['JAVASCRIPT'][filename]['source_filenames'] += dark_theme_filepath
164-
165- MFE_CONFIG['INDIGO_ENABLE_DARK_TOGGLE'] = {{ INDIGO_ENABLE_DARK_TOGGLE }}
166- MFE_CONFIG['INDIGO_FOOTER_NAV_LINKS'] = {{ INDIGO_FOOTER_NAV_LINKS }}
167- """ ,
168- ),
169- (
170- "openedx-lms-production-settings" ,
171- """
172- MFE_CONFIG['INDIGO_ENABLE_DARK_TOGGLE'] = {{ INDIGO_ENABLE_DARK_TOGGLE }}
173- MFE_CONFIG['INDIGO_FOOTER_NAV_LINKS'] = {{ INDIGO_FOOTER_NAV_LINKS }}
174- """ ,
175- ),
176- ]
177- )
178-
179-
180139# Add react components and patches from tutor-indigo
181140for path in itertools .chain (
182141 glob (
@@ -296,6 +255,41 @@ def _override_openedx_docker_image(
296255 ]
297256)
298257
258+ PLUGIN_SLOTS .add_items (
259+ [
260+ (
261+ "authoring" ,
262+ "org.openedx.frontend.layout.studio_header_search_button_slot.v1" ,
263+ """
264+ {
265+ op: PLUGIN_OPERATIONS.Insert,
266+ widget: {
267+ priority: 10,
268+ id: 'custom_notification_tray_before',
269+ type: DIRECT_PLUGIN,
270+ RenderWidget: ToggleThemeButton,
271+ },
272+ },
273+ """ ,
274+ ),
275+ (
276+ "authoring" ,
277+ "org.openedx.frontend.layout.studio_footer.v1" ,
278+ """
279+ {
280+ op: PLUGIN_OPERATIONS.Insert,
281+ widget: {
282+ id: 'read_theme_cookie',
283+ type: DIRECT_PLUGIN,
284+ priority: 2,
285+ RenderWidget: AddDarkTheme,
286+ },
287+ },
288+ """ ,
289+ ),
290+ ]
291+ )
292+
299293paragon_theme_urls = {
300294 "variants" : {
301295 "light" : {
0 commit comments