1
0
Fork 0
mirror of https://github.com/overleaf/overleaf.git synced 2025-04-08 22:40:48 +00:00

show error if socket io fails to connect. Not tested yet.

This commit is contained in:
Henry Oswald 2015-07-31 15:42:47 +01:00
parent 417fd4f5f5
commit 3e55aef25a
2 changed files with 10 additions and 1 deletions
services/web
app/views/project
public/coffee/ide/connection

View file

@ -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")

View file

@ -39,6 +39,13 @@ define [], () ->
@joinProject()
, 100)
@ide.socket.on "connect_failed", () =>
@connected = false
$scope.$apply () =>
@$scope.state.error = "Unable to connect, please view the <a href='http://sharelatex.tenderapp.com/help/kb/latex-editor/editor-connection-problems'>connection problems guide</a> to fix the issue."
@ide.socket.on 'disconnect', () =>
@connected = false
@ide.pushEvent("disconnected")