Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging
This commit is contained in:
@@ -618,7 +618,7 @@ define(function () {
|
|||||||
out.upload_mustLogin = "Vous devez vous connecter pour importer un fichier";
|
out.upload_mustLogin = "Vous devez vous connecter pour importer un fichier";
|
||||||
out.download_button = "Déchiffrer et télécharger";
|
out.download_button = "Déchiffrer et télécharger";
|
||||||
out.download_mt_button = "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_title = "CryptTodo";
|
||||||
out.todo_newTodoNamePlaceholder = "Décrivez votre tâche...";
|
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.upload_mustLogin = "You must be logged in to upload files";
|
||||||
out.download_button = "Decrypt & Download";
|
out.download_button = "Decrypt & Download";
|
||||||
out.download_mt_button = "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_title = "CryptTodo";
|
||||||
out.todo_newTodoNamePlaceholder = "Describe your task...";
|
out.todo_newTodoNamePlaceholder = "Describe your task...";
|
||||||
|
|||||||
@@ -708,9 +708,11 @@ define([
|
|||||||
var update = updateLocalVersion(NewConfig.requireConf && NewConfig.requireConf.urlArgs);
|
var update = updateLocalVersion(NewConfig.requireConf && NewConfig.requireConf.urlArgs);
|
||||||
if (update) {
|
if (update) {
|
||||||
postMessage('DISCONNECT');
|
postMessage('DISCONNECT');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
common.onNetworkReconnect.fire(data);
|
||||||
});
|
});
|
||||||
common.onNetworkReconnect.fire(data); break;
|
break;
|
||||||
}
|
}
|
||||||
// Messenger
|
// Messenger
|
||||||
case 'CONTACTS_MESSAGE': {
|
case 'CONTACTS_MESSAGE': {
|
||||||
|
|||||||
@@ -96,11 +96,17 @@
|
|||||||
|
|
||||||
|
|
||||||
// Download a blob from href
|
// 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();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.open('GET', src, true);
|
xhr.open('GET', src, true);
|
||||||
xhr.responseType = 'arraybuffer';
|
xhr.responseType = 'arraybuffer';
|
||||||
|
|
||||||
|
xhr.onerror = function () { return void cb("XHR_ERROR"); };
|
||||||
xhr.onload = function () {
|
xhr.onload = function () {
|
||||||
// Error?
|
// Error?
|
||||||
if (/^4/.test('' + this.status)) { return void cb("XHR_ERROR " + this.status); }
|
if (/^4/.test('' + this.status)) { return void cb("XHR_ERROR " + this.status); }
|
||||||
|
|||||||
@@ -443,6 +443,7 @@ define([
|
|||||||
$err.find('a').click(function () {
|
$err.find('a').click(function () {
|
||||||
funcs.gotoURL();
|
funcs.gotoURL();
|
||||||
});
|
});
|
||||||
|
UI.findOKButton().click();
|
||||||
UI.errorLoadingScreen($err, true, true);
|
UI.errorLoadingScreen($err, true, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ define([
|
|||||||
xhr.setRequestHeader('Range', 'bytes=0-1');
|
xhr.setRequestHeader('Range', 'bytes=0-1');
|
||||||
xhr.responseType = 'arraybuffer';
|
xhr.responseType = 'arraybuffer';
|
||||||
|
|
||||||
|
xhr.onerror= function () { return CB('XHR_ERROR'); };
|
||||||
xhr.onload = function () {
|
xhr.onload = function () {
|
||||||
if (/^4/.test('' + this.status)) { return CB('XHR_ERROR'); }
|
if (/^4/.test('' + this.status)) { return CB('XHR_ERROR'); }
|
||||||
var res = new Uint8Array(xhr.response);
|
var res = new Uint8Array(xhr.response);
|
||||||
|
|||||||
@@ -95,7 +95,9 @@ define([
|
|||||||
FileCrypto.fetchDecryptedMetadata(src, key, function (e, metadata) {
|
FileCrypto.fetchDecryptedMetadata(src, key, function (e, metadata) {
|
||||||
if (e) {
|
if (e) {
|
||||||
if (e === 'XHR_ERROR') {
|
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);
|
return void console.error(e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user