Remove connection lost popup when websocket connection is lost

pull/1/head
yflory 7 years ago
parent 6a7c86aee7
commit f45023ed1f

@ -47,7 +47,7 @@ define(function () {
out.disconnected = 'Déconnecté';
out.synchronizing = 'Synchronisation';
out.reconnecting = 'Reconnexion...';
out.reconnecting = 'Reconnexion';
out.typing = "Édition";
out.initializing = "Initialisation...";
out.forgotten = 'Déplacé vers la corbeille';
@ -361,7 +361,7 @@ define(function () {
out.fm_templateName = "Modèles";
out.fm_searchName = "Recherche";
out.fm_recentPadsName = "Pads récents";
out.fm_ownedPadsName = "Possédés";
out.fm_ownedPadsName = "Pads possédés";
out.fm_searchPlaceholder = "Rechercher...";
out.fm_newButton = "Nouveau";
out.fm_newButtonTitle = "Créer un nouveau pad ou un dossier, importer un fichier dans le dossier courant";

@ -48,7 +48,7 @@ define(function () {
out.disconnected = 'Disconnected';
out.synchronizing = 'Synchronizing';
out.reconnecting = 'Reconnecting...';
out.reconnecting = 'Reconnecting';
out.typing = "Editing";
out.initializing = "Initializing...";
out.forgotten = 'Moved to the trash';

@ -325,11 +325,11 @@ define([
var onConnectionChange = function (info) {
if (state === STATE.DELETED) { return; }
stateChange(info.state ? STATE.INITIALIZING : STATE.DISCONNECTED);
if (info.state) {
/*if (info.state) {
UI.findOKButton().click();
} else {
UI.alert(Messages.common_connectionLost, undefined, true);
}
}*/
};
var onError = function (err) {

@ -1048,6 +1048,13 @@ define([
toolbar.reconnecting = function (/*userId*/) {
toolbar.connected = false;
if (toolbar.spinner) {
var state = -1;
var interval = window.setInterval(function () {
if (toolbar.connected) { clearInterval(interval); }
var dots = Array(state+1).join('.');
toolbar.spinner.text(Messages.reconnecting + dots);
if (++state > 3) { state = 0; }
}, 500);
toolbar.spinner.text(Messages.reconnecting);
}
};

@ -237,7 +237,7 @@ define([
'tabindex': '-1',
'data-icon': faFolder,
}, Messages.fc_newfolder)),
h('li', h('a.cp-app-drive-context-hashtag.dropdown-item', {
h('li', h('a.cp-app-drive-context-hashtag.dropdown-item.cp-app-drive-context-editable', {
'tabindex': '-1',
'data-icon': faTags,
}, Messages.fc_hashtag)),

@ -1117,13 +1117,13 @@ define([
});
}
setEditable(false);
UI.alert(Messages.common_connectionLost, undefined, true);
//UI.alert(Messages.common_connectionLost, undefined, true);
};
var onReconnect = function () {
if (APP.unrecoverable) { return; }
setEditable(true);
UI.findOKButton().click();
//UI.findOKButton().click();
};
var getHeadingText = function () {

@ -616,9 +616,9 @@ define([
setEditable(info.state);
if (info.state) {
initializing = true;
UI.findOKButton().click();
//UI.findOKButton().click();
} else {
UI.alert(Messages.common_connectionLost, undefined, true);
//UI.alert(Messages.common_connectionLost, undefined, true);
}
};

Loading…
Cancel
Save