mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge branch 'connect-failed'
This commit is contained in:
commit
a73b2ceb37
2 changed files with 11 additions and 1 deletions
|
@ -13,7 +13,9 @@ block content
|
|||
h3 #{translate("loading")}...
|
||||
.progress
|
||||
.progress-bar(style="width: 20%", ng-style="{'width': state.load_progress + '%'}")
|
||||
p.text-center.text-danger(ng-if="state.error").ng-cloak {{ state.error }}
|
||||
p.text-center.text-danger(ng-if="state.error").ng-cloak
|
||||
span(ng-bind-html="state.error")
|
||||
|
||||
|
||||
.global-alerts(ng-cloak)
|
||||
.alert.alert-danger.small(ng-if="connection.forced_disconnect")
|
||||
|
|
|
@ -29,6 +29,7 @@ define [], () ->
|
|||
|
||||
@ide.socket = io.connect null,
|
||||
reconnect: false
|
||||
'connect timeout': 30 * 1000
|
||||
"force new connection": true
|
||||
|
||||
@ide.socket.on "connect", () =>
|
||||
|
@ -44,6 +45,13 @@ define [], () ->
|
|||
@joinProject()
|
||||
, 100)
|
||||
|
||||
@ide.socket.on "connect_failed", () =>
|
||||
@connected = false
|
||||
$scope.$apply () =>
|
||||
@$scope.state.error = "Unable to connect, please view the <u><a href='http://sharelatex.tenderapp.com/help/kb/latex-editor/editor-connection-problems'>connection problems guide</a></u> to fix the issue."
|
||||
|
||||
|
||||
|
||||
@ide.socket.on 'disconnect', () =>
|
||||
@connected = false
|
||||
@ide.pushEvent("disconnected")
|
||||
|
|
Loading…
Reference in a new issue