Merge branch 'soon'

pull/1/head
yflory 5 years ago
commit 175510f0d1

@ -1000,6 +1000,9 @@ define([
}).nThen(cb); }).nThen(cb);
}; };
Store.setPadTitle = function (clientId, data, cb) { Store.setPadTitle = function (clientId, data, cb) {
if (store.offline) {
return void cb({ error: 'OFFLINE' });
}
var title = data.title; var title = data.title;
var href = data.href; var href = data.href;
var channel = data.channel; var channel = data.channel;
@ -1811,6 +1814,10 @@ define([
if (!cmdData || !cmdData.cmd) { return; } if (!cmdData || !cmdData.cmd) { return; }
//var data = cmdData.data; //var data = cmdData.data;
var s = getStore(cmdData.teamId); var s = getStore(cmdData.teamId);
if (s.offline) {
broadcast([], 'NETWORK_DISCONNECT');
return void cb({ error: 'OFFLINE' });
}
var cb2 = function (data2) { var cb2 = function (data2) {
// Send the CHANGE event to all the stores because the command may have // Send the CHANGE event to all the stores because the command may have
// affected data from a shared folder used by multiple teams. // affected data from a shared folder used by multiple teams.
@ -2237,9 +2244,11 @@ define([
}); });
rt.proxy.on('disconnect', function () { rt.proxy.on('disconnect', function () {
store.offline = true;
broadcast([], 'NETWORK_DISCONNECT'); broadcast([], 'NETWORK_DISCONNECT');
}); });
rt.proxy.on('reconnect', function (info) { rt.proxy.on('reconnect', function (info) {
store.offline = false;
broadcast([], 'NETWORK_RECONNECT', {myId: info.myId}); broadcast([], 'NETWORK_RECONNECT', {myId: info.myId});
}); });

@ -74,6 +74,12 @@ define([
path: p path: p
}); });
}); });
proxy.on('disconnect', function () {
team.offline = true;
});
proxy.on('reconnect', function (info) {
team.offline = false;
});
}; };
var closeTeam = function (ctx, teamId) { var closeTeam = function (ctx, teamId) {

@ -457,7 +457,7 @@ define([
path: initialPathInDrive // Where to store the pad if we don't have it in our drive path: initialPathInDrive // Where to store the pad if we don't have it in our drive
}; };
Cryptpad.setPadTitle(data, function (err) { Cryptpad.setPadTitle(data, function (err) {
cb(err); cb({error: err});
}); });
}); });
sframeChan.on('EV_SET_TAB_TITLE', function (newTabTitle) { sframeChan.on('EV_SET_TAB_TITLE', function (newTabTitle) {

@ -64,10 +64,13 @@ define([
sframeChan.query('Q_SET_PAD_TITLE_IN_DRIVE', { sframeChan.query('Q_SET_PAD_TITLE_IN_DRIVE', {
title: title, title: title,
defaultTitle: defaultTitle defaultTitle: defaultTitle
}, function (err) { }, function (err, obj) {
err = err || (obj && obj.error);
if (err === 'E_OVER_LIMIT') { if (err === 'E_OVER_LIMIT') {
return void UI.alert(Messages.pinLimitNotPinned, null, true); return void UI.alert(Messages.pinLimitNotPinned, null, true);
} else if (err) { return; } } else if (err) {
return UI.alert(Messages.driveOfflineError);
}
evTitleChange.fire(title); evTitleChange.fire(title);
if (titleUpdated) { if (titleUpdated) {
titleUpdated(undefined, title); titleUpdated(undefined, title);

@ -1225,5 +1225,9 @@
"team_viewers": "Betrachter", "team_viewers": "Betrachter",
"drive_sfPassword": "Dein geteilter Ordner {0} ist nicht mehr verfügbar. Entweder wurde er von seinem Eigentümer gelöscht oder er ist nun mit einem neuen Passwort geschützt. Du kannst den Ordner aus deinem CryptDrive entfernen oder den Zugriff durch Eingabe des neuen Passworts wiederherstellen.", "drive_sfPassword": "Dein geteilter Ordner {0} ist nicht mehr verfügbar. Entweder wurde er von seinem Eigentümer gelöscht oder er ist nun mit einem neuen Passwort geschützt. Du kannst den Ordner aus deinem CryptDrive entfernen oder den Zugriff durch Eingabe des neuen Passworts wiederherstellen.",
"drive_sfPasswordError": "Falsches Passwort", "drive_sfPasswordError": "Falsches Passwort",
"password_error_seed": "Pad nicht gefunden!<br>Dieser Fehler kann zwei Ursachen haben: Entweder wurde ein Passwort gesetzt/geändert oder das Pad wurde vom Server gelöscht." "password_error_seed": "Pad nicht gefunden!<br>Dieser Fehler kann zwei Ursachen haben: Entweder wurde ein Passwort gesetzt/geändert oder das Pad wurde vom Server gelöscht.",
"properties_confirmChangeFile": "Bist du sicher? Benutzer, die das neue Passwort nicht kennen, werden den Zugriff auf die Datei verlieren.",
"properties_confirmNewFile": "Bist du sicher? Durch das Hinzufügen eines Passwortes wird sich der Link für die Datei ändern. Benutzer, die das Passwort nicht kennen, werden den Zugriff auf die Datei verlieren.",
"properties_passwordWarningFile": "Das Passwort wurde erfolgreich geändert. Allerdings konnten die Daten in deinem CryptDrive nicht aktualisiert werden. Möglicherweise musst die alte Version der Datei manuell entfernen.",
"properties_passwordSuccessFile": "Das Passwort wurde erfolgreich geändert."
} }

@ -1225,5 +1225,10 @@
"team_viewers": "Lecteurs", "team_viewers": "Lecteurs",
"drive_sfPassword": "Votre dossier partagé {0} n'est plus disponible. Il a soit été supprimé par son propriétaire ou il est protégé par un nouveau mot de passe. Vous pouvez supprimer ce dossier de votre CryptDrive ou retrouver l'accès en tapant le nouveau mot de passe.", "drive_sfPassword": "Votre dossier partagé {0} n'est plus disponible. Il a soit été supprimé par son propriétaire ou il est protégé par un nouveau mot de passe. Vous pouvez supprimer ce dossier de votre CryptDrive ou retrouver l'accès en tapant le nouveau mot de passe.",
"drive_sfPasswordError": "Mot de passe incorrect", "drive_sfPasswordError": "Mot de passe incorrect",
"password_error_seed": "Pad introuvable !<br>Cette erreur peut provenir de deux facteurs. Soit un mot de passe a été ajouté ou modifié, soit le pad a été supprimé par son propriétaire." "password_error_seed": "Pad introuvable !<br>Cette erreur peut provenir de deux facteurs. Soit un mot de passe a été ajouté ou modifié, soit le pad a été supprimé par son propriétaire.",
"properties_confirmChangeFile": "Êtes-vous sûr ? Les utilisateurs ne connaissant pas le nouveau mot de passe perdront l'accès au fichier.",
"properties_confirmNewFile": "Êtes-vous sûr ? Ajouter un mot de passe changera l'URL de ce fichier. Les utilisateurs ne connaissant pas le nouveau mot de passe perdront l'accès au fichier.",
"properties_passwordWarningFile": "Le mot de passe a été modifié avec succès mais nous n'avons pas réussi à mettre à jour votre CryptDrive avec les nouvelles informations. Vous devrez peut-être supprimer manuellement l'ancienne version de ce fichier.",
"properties_passwordSuccessFile": "Le mot de passe a été modifié avec succès.",
"driveOfflineError": "Votre connexion à CryptPad a été perdue. Les modifications dans ce pad ne seront pas stockées dans votre CryptDrive. Veuillez fermer tous vos onglets CryptPad et ré-essayer dans une nouvelle fenêtre. "
} }

@ -1225,5 +1225,10 @@
"team_viewers": "Viewers", "team_viewers": "Viewers",
"drive_sfPassword": "Your shared folder {0} is no longer available. It has either been deleted by its owner or it is now protected with a new password. You can remove this folder from your CryptDrive, or recover access using the new password.", "drive_sfPassword": "Your shared folder {0} is no longer available. It has either been deleted by its owner or it is now protected with a new password. You can remove this folder from your CryptDrive, or recover access using the new password.",
"drive_sfPasswordError": "Wrong password", "drive_sfPasswordError": "Wrong password",
"password_error_seed": "Pad not found!<br>This error can be caused by two factors: either a password was added/changed, or the pad has been deleted from the server." "password_error_seed": "Pad not found!<br>This error can be caused by two factors: either a password was added/changed, or the pad has been deleted from the server.",
"properties_confirmChangeFile": "Are you sure? Users without the new password will lose access to this file.",
"properties_confirmNewFile": "Are you sure? Adding a password will change this file's URL. Users without the password will lose access to this file.",
"properties_passwordWarningFile": "The password was successfully changed but we were unable to update your CryptDrive with the new data. You may have to remove the old version of the file manually.",
"properties_passwordSuccessFile": "The password was successfully changed.",
"driveOfflineError": "Your connection to CryptPad has been lost. Changes to this pad will not be saved in your CryptDrive. Please close all CryptPad tabs and try again in a new window. "
} }

@ -12,7 +12,8 @@
"kanban": "Kanban", "kanban": "Kanban",
"todo": "A Fazer", "todo": "A Fazer",
"contacts": "Contactos", "contacts": "Contactos",
"sheet": "SpreadSheet (Beta)" "sheet": "SpreadSheet (Beta)",
"teams": ""
}, },
"button_newpad": "Novo bloco RTF", "button_newpad": "Novo bloco RTF",
"button_newcode": "Novo bloco de código", "button_newcode": "Novo bloco de código",
@ -335,5 +336,117 @@
}, },
"feedback_about": "If you're reading this, you were probably curious why CryptPad is requesting web pages when you perform certain actions", "feedback_about": "If you're reading this, you were probably curious why CryptPad is requesting web pages when you perform certain actions",
"feedback_privacy": "We care about your privacy, and at the same time we want CryptPad to be very easy to use. We use this file to figure out which UI features matter to our users, by requesting it along with a parameter specifying which action was taken.", "feedback_privacy": "We care about your privacy, and at the same time we want CryptPad to be very easy to use. We use this file to figure out which UI features matter to our users, by requesting it along with a parameter specifying which action was taken.",
"feedback_optout": "If you would like to opt out, visit <a href='/settings/'>your user settings page</a>, where you'll find a checkbox to enable or disable user feedback" "feedback_optout": "If you would like to opt out, visit <a href='/settings/'>your user settings page</a>, where you'll find a checkbox to enable or disable user feedback",
"button_newkanban": "",
"button_newsheet": "",
"padNotPinned": "",
"anonymousStoreDisabled": "",
"expiredError": "",
"deletedError": "",
"inactiveError": "",
"chainpadError": "",
"invalidHashError": "",
"errorCopy": "",
"errorRedirectToHome": "",
"newVersionError": "",
"deletedFromServer": "",
"mustLogin": "",
"disabledApp": "",
"realtime_unrecoverableError": "",
"typing": "",
"initializing": "",
"forgotten": "",
"errorState": "",
"userlist_offline": "",
"supportCryptpad": "",
"pinLimitReachedAlertNoAccounts": "",
"moreActions": "",
"importButton": "",
"exportButton": "",
"saveTitle": "",
"forgetButton": "",
"userListButton": "",
"chatButton": "",
"userAccountButton": "",
"uploadButton": "",
"uploadFolderButton": "",
"uploadButtonTitle": "",
"useTemplate": "",
"useTemplateOK": "",
"useTemplateCancel": "",
"template_import": "",
"template_empty": "",
"propertiesButton": "",
"propertiesButtonTitle": "",
"printText": "",
"printButtonTitle2": "",
"printBackground": "",
"printBackgroundButton": "",
"printBackgroundValue": "",
"printBackgroundNoValue": "",
"printBackgroundRemove": "",
"filePickerButton": "",
"filePicker_close": "",
"filePicker_description": "",
"filePicker_filter": "",
"or": "",
"tags_title": "",
"tags_add": "",
"tags_searchHint": "",
"tags_notShared": "",
"tags_duplicate": "",
"tags_noentry": "",
"slideOptionsText": "",
"slide_invalidLess": "",
"languageButton": "",
"themeButton": "",
"themeButtonTitle": "",
"viewOpen": "",
"viewOpenTitle": "",
"getEmbedCode": "",
"viewEmbedTitle": "",
"viewEmbedTag": "",
"fileEmbedTitle": "",
"fileEmbedScript": "",
"fileEmbedTag": "",
"ok": "",
"doNotAskAgain": "",
"show_help_button": "",
"hide_help_button": "",
"help_button": "",
"historyText": "",
"openLinkInNewTab": "",
"pad_mediatagTitle": "",
"pad_mediatagWidth": "",
"pad_mediatagHeight": "",
"pad_mediatagRatio": "",
"pad_mediatagBorder": "",
"pad_mediatagPreview": "",
"pad_mediatagImport": "",
"pad_mediatagOptions": "",
"kanban_newBoard": "",
"kanban_item": "",
"kanban_todo": "",
"kanban_done": "",
"kanban_working": "",
"kanban_deleteBoard": "",
"kanban_addBoard": "",
"kanban_removeItem": "",
"kanban_removeItemConfirm": "",
"poll_remove": "",
"poll_edit": "",
"poll_locked": "",
"poll_unlocked": "",
"poll_total": "",
"poll_comment_list": "",
"poll_comment_add": "",
"poll_comment_submit": "",
"poll_comment_remove": "",
"poll_comment_placeholder": "",
"poll_comment_disabled": "",
"oo_reconnect": "",
"oo_cantUpload": "",
"oo_uploaded": "",
"canvas_opacityLabel": "",
"canvas_widthLabel": ""
} }

Loading…
Cancel
Save