mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-04 21:33:34 +00:00
Show message and auto refresh on force disconnect
This commit is contained in:
parent
8146a09b42
commit
4abf6ed38c
1 changed files with 11 additions and 2 deletions
|
@ -47,9 +47,18 @@ define [], () ->
|
|||
|
||||
@ide.socket.on 'forceDisconnect', (message) =>
|
||||
@$scope.$apply () =>
|
||||
@$scope.permissions.write = false
|
||||
@$scope.connection.forced_disconnect = true
|
||||
@socket.disconnect()
|
||||
|
||||
@ide.socket.socket.disconnect()
|
||||
@ide.showGenericMessageModal("Please Refresh", """
|
||||
We're performing maintenance on ShareLaTeX and you need to refresh the editor.
|
||||
Sorry for any inconvenience.
|
||||
The editor will refresh in automatically in 10 seconds.
|
||||
""")
|
||||
setTimeout () ->
|
||||
location.reload()
|
||||
, 10 * 1000
|
||||
|
||||
joinProject: () ->
|
||||
@ide.socket.emit 'joinProject', {
|
||||
project_id: @ide.project_id
|
||||
|
|
Loading…
Reference in a new issue