Merge pull request #1834 from overleaf/ns-sd-synctex-fail-gooder

display warning if synctex fails to return filename

GitOrigin-RevId: 1de5f9f06a03d6debc35cd4bace6cc921a634d6d
This commit is contained in:
Simon Detheridge 2019-06-17 15:47:19 +01:00 committed by sharelatex
parent 82672269c4
commit 08861187d5
3 changed files with 19 additions and 1 deletions

View file

@ -34,6 +34,13 @@ block content
.alert.alert-warning.small(ng-if="connection.reconnecting")
strong #{translate("reconnecting")}...
.alert.alert-warning.small(ng-if="sync_tex_error")
strong #{translate("synctex_failed")}.
a#synctex-more-info-button.alert-link-as-btn.pull-right(
href="/learn/how-to/SyncTeX_Errors"
target="_blank"
) #{translate("more_info")}
.alert.alert-warning.small(ng-if="connection.inactive_disconnect")
strong #{translate("editor_disconected_click_to_reconnect")}

View file

@ -1012,7 +1012,11 @@ define([
})
.then(function(response) {
const { data } = response
if (data.code != null && data.code.length > 0) {
if (
data.code != null &&
data.code.length > 0 &&
data.code[0].file !== ''
) {
const doc = ide.fileTreeManager.findEntityByPath(
data.code[0].file
)
@ -1020,6 +1024,9 @@ define([
return
}
return deferred.resolve({ doc, line: data.code[0].line })
} else if (data.code[0].file === '') {
ide.$scope.sync_tex_error = true
setTimeout(() => (ide.$scope.sync_tex_error = false), 4000)
}
})
.catch(function(response) {

View file

@ -72,6 +72,10 @@
margin-left: 20px;
}
#synctex-more-info-button {
margin-left: 20px;
}
#ide-body {
.full-size;
top: @ide-body-top-offset;