Display a message when pinPads returns an error

pull/1/head
yflory 8 years ago
parent 67a04a16ec
commit 538aec6ef5

@ -247,6 +247,7 @@ define(function () {
'nos raisons pour ces changements et pourquoi vous devriez vraiment <a href="/register/">vous enregistrer</a> et <a href="/login/">vous connecter</a>.';
out.fm_backup_title = 'Lien de secours';
out.fm_nameFile = 'Comment souhaitez-vous nommer ce fichier ?';
out.fm_error_cantPin = "Erreur interne du serveur. Veuillez recharger la page et essayer de nouveau.";
// File - Context menu
out.fc_newfolder = "Nouveau dossier";
out.fc_rename = "Renommer";

@ -249,6 +249,7 @@ define(function () {
'why we are doing this and why you really should <a href="/register/">Sign up</a> and <a href="/login/">Log in</a>.';
out.fm_backup_title = 'Backup link';
out.fm_nameFile = 'How would you like to name that file?';
out.fm_error_cantPin = "Internal server error. Please reload the page and try again.";
// File - Context menu
out.fc_newfolder = "New folder";
out.fc_rename = "Rename";

@ -575,7 +575,10 @@ define([
atime: +new Date(),
ctime: +new Date()
}, function (err) {
if (err) { return void cb(err); }
if (err) {
logError(err);
return void cb(err);
}
parentEl[fileName] = href;
var newPath = filePath.slice();
newPath.push(fileName);

@ -1397,9 +1397,12 @@ define([
// Handlers
if (isInRoot) {
var onCreated = function (err, info) {
if (err && err === E_OVER_LIMIT) {
if (err) {
if (err === E_OVER_LIMIT) {
return void Cryptpad.alert(Messages.pinLimitDrive, null, true);
}
return void Cryptpad.alert(Messages.fm_error_cantPin);
}
module.newFolder = info.newPath;
refresh();
};
@ -2361,7 +2364,7 @@ define([
return void Cryptpad.alert(Messages.pinLimitDrive, null, true);
}
if (err) {
return void console.error("Unable to create the file", err);
return void Cryptpad.alert(Messages.fm_error_cantPin);
}
module.newFolder = info.newPath;
refresh();

Loading…
Cancel
Save