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'
)
let disableAngularRouter = shouldDisplayFeature(
'disable_angular_router',
user.alphaProgram || user.betaProgram
)
const showPdfDetach = shouldDisplayFeature(
'pdf_detach',
user.alphaProgram
@ -885,7 +880,6 @@ const ProjectController = {
let detachRole = null
if (showPdfDetach) {
disableAngularRouter = true
showNewPdfPreview = true
detachRole = req.params.detachRole
}
@ -951,7 +945,6 @@ const ProjectController = {
showPdfDetach,
debugPdfDetach,
showNewPdfPreview,
disableAngularRouter,
showNewSourceEditor: shouldDisplayFeature(
'new_source_editor',
false

View file

@ -144,7 +144,6 @@ block append meta
meta(name="ol-logsUISubvariant" content=logsUISubvariant)
meta(name="ol-showPdfDetach" data-type="boolean" content=showPdfDetach)
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-enablePdfCaching" data-type="boolean" content=enablePdfCaching)
meta(name="ol-trackPdfDownload" data-type="boolean" content=trackPdfDownload)

View file

@ -401,20 +401,18 @@ if (getMeta('ol-resetServiceWorker')) {
loadServiceWorker()
}
if (getMeta('ol-disableAngularRouter')) {
angular.module('SharelatexApp').config(function ($provide) {
$provide.decorator('$browser', [
'$delegate',
function ($delegate) {
$delegate.onUrlChange = function () {}
$delegate.url = function () {
return ''
}
return $delegate
},
])
})
}
angular.module('SharelatexApp').config(function ($provide) {
$provide.decorator('$browser', [
'$delegate',
function ($delegate) {
$delegate.onUrlChange = function () {}
$delegate.url = function () {
return ''
}
return $delegate
},
])
})
export default angular.bootstrap(document.body, ['SharelatexApp'])