Merge pull request #9431 from overleaf/td-galileo-query-string

Add galileoFeatures query string parameter

GitOrigin-RevId: 19022b95490e5e664872102ed2b4ab156f955364
This commit is contained in:
Timothée Alby 2022-09-01 10:54:04 +02:00 committed by Copybot
parent 25725bd79f
commit 9e8d10bd8e
2 changed files with 8 additions and 0 deletions

View file

@ -1116,7 +1116,13 @@ const ProjectController = {
!Features.hasFeature('saas') ||
(user.features && user.features.symbolPalette)
// It would be nice if this could go in the Galileo module but
// nothing else does that
const galileoEnabled = shouldDisplayFeature('galileo')
const galileoFeatures =
req.query && 'galileoFeatures' in req.query
? req.query.galileoFeatures.split(',').map(f => f.trim())
: ['all']
const dictionaryEditorEnabled =
!Features.hasFeature('saas') ||
@ -1200,6 +1206,7 @@ const ProjectController = {
showNewSourceEditorOption,
showSymbolPalette,
galileoEnabled,
galileoFeatures,
showStopOnFirstError,
detachRole,
metadata: { viewport: false },

View file

@ -23,6 +23,7 @@ meta(name="ol-debugPdfDetach" data-type="boolean" content=debugPdfDetach)
meta(name="ol-showNewSourceEditorOption" data-type="boolean" content=showNewSourceEditorOption)
meta(name="ol-showSymbolPalette" data-type="boolean" content=showSymbolPalette)
meta(name="ol-galileoEnabled" data-type="boolean" content=galileoEnabled)
meta(name="ol-galileoFeatures" data-type="json" content=galileoFeatures)
meta(name="ol-detachRole" data-type="string" content=detachRole)
meta(name="ol-showUpgradePrompt" data-type="boolean" content=showUpgradePrompt)
meta(name="ol-showStopOnFirstError" data-type="boolean" content=showStopOnFirstError)