Merge pull request #6624 from overleaf/bg-cm6-autocompile-lint-check

[web] add cm6 hasLintingError support

GitOrigin-RevId: 9e531526003595cb5139623f929605a7fd0f59f8
This commit is contained in:
June Kelly 2022-02-08 09:22:20 +00:00 committed by Copybot
parent ab5135957a
commit 19edfab153

View file

@ -402,6 +402,11 @@ If the project has been renamed please look in your project list for a new proje
// Allow service worker to be removed via the websocket // Allow service worker to be removed via the websocket
ide.$scope.$on('service-worker:unregister', unregisterServiceWorker) ide.$scope.$on('service-worker:unregister', unregisterServiceWorker)
// Listen for editor:lint event from CM6 linter
window.addEventListener('editor:lint', event => {
$scope.hasLintingError = event.detail.hasLintingError
})
return ide.socket.on('project:publicAccessLevel:changed', data => { return ide.socket.on('project:publicAccessLevel:changed', data => {
if (data.newAccessLevel != null) { if (data.newAccessLevel != null) {
ide.$scope.project.publicAccesLevel = data.newAccessLevel ide.$scope.project.publicAccesLevel = data.newAccessLevel