Merge pull request #5983 from overleaf/jel-release-disable-ng-router

Release disabling angular router

GitOrigin-RevId: be54f3cda5f0086ac2b6f3fcf56c4fa452d1bc0d
This commit is contained in:
Jessica Lawshe 2021-12-02 09:18:47 -06:00 committed by Copybot
parent 956724c838
commit 0e20c204a1
3 changed files with 12 additions and 22 deletions

View file

@ -870,11 +870,6 @@ const ProjectController = {
newPdfPreviewAssignment.variant === 'react-pdf-preview' newPdfPreviewAssignment.variant === 'react-pdf-preview'
) )
let disableAngularRouter = shouldDisplayFeature(
'disable_angular_router',
user.alphaProgram || user.betaProgram
)
const showPdfDetach = shouldDisplayFeature( const showPdfDetach = shouldDisplayFeature(
'pdf_detach', 'pdf_detach',
user.alphaProgram user.alphaProgram
@ -885,7 +880,6 @@ const ProjectController = {
let detachRole = null let detachRole = null
if (showPdfDetach) { if (showPdfDetach) {
disableAngularRouter = true
showNewPdfPreview = true showNewPdfPreview = true
detachRole = req.params.detachRole detachRole = req.params.detachRole
} }
@ -951,7 +945,6 @@ const ProjectController = {
showPdfDetach, showPdfDetach,
debugPdfDetach, debugPdfDetach,
showNewPdfPreview, showNewPdfPreview,
disableAngularRouter,
showNewSourceEditor: shouldDisplayFeature( showNewSourceEditor: shouldDisplayFeature(
'new_source_editor', 'new_source_editor',
false false

View file

@ -144,7 +144,6 @@ block append meta
meta(name="ol-logsUISubvariant" content=logsUISubvariant) meta(name="ol-logsUISubvariant" content=logsUISubvariant)
meta(name="ol-showPdfDetach" data-type="boolean" content=showPdfDetach) meta(name="ol-showPdfDetach" data-type="boolean" content=showPdfDetach)
meta(name="ol-debugPdfDetach" data-type="boolean" content=debugPdfDetach) meta(name="ol-debugPdfDetach" data-type="boolean" content=debugPdfDetach)
meta(name="ol-disableAngularRouter" data-type="boolean" content=disableAngularRouter)
meta(name="ol-showNewPdfPreview" data-type="boolean" content=showNewPdfPreview) meta(name="ol-showNewPdfPreview" data-type="boolean" content=showNewPdfPreview)
meta(name="ol-enablePdfCaching" data-type="boolean" content=enablePdfCaching) meta(name="ol-enablePdfCaching" data-type="boolean" content=enablePdfCaching)
meta(name="ol-trackPdfDownload" data-type="boolean" content=trackPdfDownload) meta(name="ol-trackPdfDownload" data-type="boolean" content=trackPdfDownload)

View file

@ -401,8 +401,7 @@ if (getMeta('ol-resetServiceWorker')) {
loadServiceWorker() loadServiceWorker()
} }
if (getMeta('ol-disableAngularRouter')) { angular.module('SharelatexApp').config(function ($provide) {
angular.module('SharelatexApp').config(function ($provide) {
$provide.decorator('$browser', [ $provide.decorator('$browser', [
'$delegate', '$delegate',
function ($delegate) { function ($delegate) {
@ -413,8 +412,7 @@ if (getMeta('ol-disableAngularRouter')) {
return $delegate return $delegate
}, },
]) ])
}) })
}
export default angular.bootstrap(document.body, ['SharelatexApp']) export default angular.bootstrap(document.body, ['SharelatexApp'])