Show the user that the websocket connection has been closed and posts will no longer socket in
This commit is contained in:
parent
78585f5a65
commit
d28a2cdb1e
2 changed files with 10 additions and 0 deletions
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
en:
|
||||
javascripts:
|
||||
|
||||
confirm_dialog: "Are you sure?"
|
||||
timeago:
|
||||
prefixAgo: ""
|
||||
|
|
@ -33,3 +34,7 @@ en:
|
|||
at_least_one_aspect: "You must publish to at least one aspect"
|
||||
infinite_scroll:
|
||||
no_more: "No more posts."
|
||||
web_sockets:
|
||||
disconnected:
|
||||
title: "You have been disconnected."
|
||||
body: "Posts will no longer be streamed live."
|
||||
|
|
@ -6,6 +6,11 @@ var WebSocketReceiver = {
|
|||
//Attach onmessage to websocket
|
||||
ws.onmessage = WSR.onMessage;
|
||||
ws.onclose = function() {
|
||||
Diaspora.widgets.alert.alert(
|
||||
Diaspora.widgets.i18n.t("web_socket.disconnected.title"),
|
||||
Diaspora.widgets.i18n.t("web_socket.disconnected.body")
|
||||
);
|
||||
|
||||
WSR.debug("socket closed");
|
||||
};
|
||||
ws.onopen = function() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue