mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Show message and auto refresh on force disconnect
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user