Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging

pull/1/head
ansuz 7 years ago
commit ff25929c18

@ -618,7 +618,7 @@ define(function () {
out.upload_mustLogin = "Vous devez vous connecter pour importer un fichier";
out.download_button = "Déchiffrer et télécharger";
out.download_mt_button = "Télécharger";
out.download_resourceNotAvailable = "Le fichier demandé n'est pas disponible...";
out.download_resourceNotAvailable = "Le fichier demandé n'est pas disponible... Appuyez sur Échap pour continuer.";
out.todo_title = "CryptTodo";
out.todo_newTodoNamePlaceholder = "Décrivez votre tâche...";

@ -622,7 +622,7 @@ define(function () {
out.upload_mustLogin = "You must be logged in to upload files";
out.download_button = "Decrypt & Download";
out.download_mt_button = "Download";
out.download_resourceNotAvailable = "The requested resource was not available...";
out.download_resourceNotAvailable = "The requested resource was not available... Press Esc to continue.";
out.todo_title = "CryptTodo";
out.todo_newTodoNamePlaceholder = "Describe your task...";

@ -708,9 +708,11 @@ define([
var update = updateLocalVersion(NewConfig.requireConf && NewConfig.requireConf.urlArgs);
if (update) {
postMessage('DISCONNECT');
return;
}
common.onNetworkReconnect.fire(data);
});
common.onNetworkReconnect.fire(data); break;
break;
}
// Messenger
case 'CONTACTS_MESSAGE': {

@ -96,11 +96,17 @@
// Download a blob from href
var download = function (src, cb) {
var download = function (src, _cb) {
var cb = function (e, res) {
_cb(e, res);
cb = function () {};
};
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.responseType = 'arraybuffer';
xhr.onerror = function () { return void cb("XHR_ERROR"); };
xhr.onload = function () {
// Error?
if (/^4/.test('' + this.status)) { return void cb("XHR_ERROR " + this.status); }

@ -443,6 +443,7 @@ define([
$err.find('a').click(function () {
funcs.gotoURL();
});
UI.findOKButton().click();
UI.errorLoadingScreen($err, true, true);
});

@ -65,6 +65,7 @@ define([
xhr.setRequestHeader('Range', 'bytes=0-1');
xhr.responseType = 'arraybuffer';
xhr.onerror= function () { return CB('XHR_ERROR'); };
xhr.onload = function () {
if (/^4/.test('' + this.status)) { return CB('XHR_ERROR'); }
var res = new Uint8Array(xhr.response);

@ -95,7 +95,9 @@ define([
FileCrypto.fetchDecryptedMetadata(src, key, function (e, metadata) {
if (e) {
if (e === 'XHR_ERROR') {
return void UI.errorLoadingScreen(Messages.download_resourceNotAvailable);
return void UI.errorLoadingScreen(Messages.download_resourceNotAvailable, false, function () {
common.gotoURL('/file/');
});
}
return void console.error(e);
}

Loading…
Cancel
Save