From be0bd011c3811df5ec3d81832d1c274cd0fc8fa0 Mon Sep 17 00:00:00 2001 From: Alexandros Date: Sun, 2 Jul 2017 20:56:13 +0300 Subject: [PATCH 01/15] Fix readme cryptpad-docker doc link --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 4ed335c9e..586463af0 100644 --- a/readme.md +++ b/readme.md @@ -129,7 +129,7 @@ Still there are other low-lives in the world so using CryptPad over HTTPS is pro ## Setup using Docker -See [Cryptpad-Docker](cryptpad-docker.md) +See [Cryptpad-Docker](docs/cryptpad-docker.md) ## Translations From 63fd7b4ddee38ae858955b9971a788bbdab15e08 Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 5 Jul 2017 16:00:54 +0200 Subject: [PATCH 02/15] implement EXPIRE_SESSION rpc --- rpc.js | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/rpc.js b/rpc.js index 5b5d058b9..96ed2cde1 100644 --- a/rpc.js +++ b/rpc.js @@ -113,15 +113,21 @@ var isTooOld = function (time, now) { return (now - time) > 300000; }; +var expireSession = function (Sessions, key) { + var session = Sessions[key]; + if (!session) { return; } + if (session.blobstage) { + session.blobstage.close(); + } + delete Sessions[key]; +}; + var expireSessions = function (Sessions) { var now = +new Date(); Object.keys(Sessions).forEach(function (key) { var session = Sessions[key]; - if (isTooOld(Sessions[key].atime, now)) { - if (session.blobstage) { - session.blobstage.close(); - } - delete Sessions[key]; + if (session && isTooOld(session.atime, now)) { + expireSession(Sessions, key); } }); }; @@ -846,6 +852,7 @@ var isAuthenticatedCall = function (call) { 'GET_LIMIT', 'UPLOAD_COMPLETE', 'UPLOAD_CANCEL', + 'EXPIRE_SESSION', ].indexOf(call) !== -1; }; @@ -1046,7 +1053,11 @@ RPC.create = function (config /*:typeof(ConfigType)*/, cb /*:(?Error, ?Function) } Respond(void 0, dict); }); - + case 'EXPIRE_SESSION': + return void setTimeout(function () { + expireSession(Sessions, safeKey); + Respond(void 0, "OK"); + }); // restricted to privileged users... case 'UPLOAD': if (!privileged) { return deny(); } From 56ed1dd4571613f1a3e9244d6b5dbf870b68a043 Mon Sep 17 00:00:00 2001 From: Pierre Bondoerffer Date: Thu, 6 Jul 2017 10:13:56 +0200 Subject: [PATCH 03/15] spanish update --- customize.dist/translations/messages.es.js | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/customize.dist/translations/messages.es.js b/customize.dist/translations/messages.es.js index ae82b0052..01623ccb0 100644 --- a/customize.dist/translations/messages.es.js +++ b/customize.dist/translations/messages.es.js @@ -485,5 +485,32 @@ define(function () { out.canvas_opacityLabel = "Opacidad: {0}"; out.canvas_widthLabel = "Talla: {0}"; + // 1.10.0 - Kraken + + out.moreActions = "Más acciones"; + out.importButton = "Importar"; + out.exportButton = "Exportar"; + out.saveTitle = "Guardar título (enter)"; + out.forgetButton = "Eliminar"; + out.printText = "Imprimir"; + out.slideOptionsText = "Opciones"; + out.historyText = "Historial"; + out.openLinkInNewTab = "Abrir enlace en pestaña nueva"; + out.profileButton = "Perfíl"; + out.profile_urlPlaceholder = "URL"; + out.profile_namePlaceholder = "Nombre mostrado en su perfíl"; + out.profile_avatar = "Imágen"; + out.profile_upload = "Subir una imágen"; + out.profile_error = "Error al crear tu perfíl: {0}"; + out.profile_register = "Tienes que registrarte para crear perfíl"; + out.profile_create = "Crear perfíl"; + out.profile_description = "Descripción"; + out.profile_fieldSaved = "Guardado: {0}"; + out.download_mt_button = "Descargar"; + out.updated_0_header_logoTitle = "Volver a tu CryptDrive"; + out.header_logoTitle = out.updated_0_header_logoTitle; + + + return out; }); From de420de02125ae7e0a1431d36433c2054ff4a8b6 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 6 Jul 2017 10:40:21 +0200 Subject: [PATCH 04/15] Fix the folder's path in the search results page --- www/drive/file.less | 5 +++++ www/drive/main.js | 17 ++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/www/drive/file.less b/www/drive/file.less index 9bb4eccf4..c9e36e7b2 100644 --- a/www/drive/file.less +++ b/www/drive/file.less @@ -416,6 +416,11 @@ span { } .path { font-style: italic; + direction: rtl; + .element { + display: inline-block; + margin-right: 5px; + } } .title { font-weight: bold; diff --git a/www/drive/main.js b/www/drive/main.js index d31c701a6..050e9ab8d 100644 --- a/www/drive/main.js +++ b/www/drive/main.js @@ -1250,12 +1250,11 @@ define([ }; // Create the title block with the "parent folder" button - var createTitle = function (path, noStyle) { + var createTitle = function ($container, path, noStyle) { if (!path || path.length === 0) { return; } var isTrash = filesOp.isPathIn(path, [TRASH]); - var $title = $driveToolbar.find('.path'); - if (APP.mobile()) { - return $title; + if (APP.mobile() && !noStyle) { // noStyle means title in search result + return $container; } var el = path[0] === SEARCH ? undefined : filesOp.find(path); path = path[0] === SEARCH ? path.slice(0,1) : path; @@ -1281,12 +1280,11 @@ define([ if (idx === 0) { name = getPrettyName(p); } else { var $span2 = $('', {'class': 'element separator'}).text(' / '); - $title.prepend($span2); + $container.prepend($span2); } - $span.text(name).prependTo($title); + $span.text(name).prependTo($container); }); - return $title; }; var createInfoBox = function (path) { @@ -1764,7 +1762,8 @@ define([ path.pop(); path.push(r.data.title); } - var $path = $('', {'class': 'col1 path'}).html(createTitle(path, true).html()); + var $path = $('', {'class': 'col1 path'}); + createTitle($path, path, true); var parentPath = path.slice(); var $a; if (parentPath) { @@ -1859,7 +1858,7 @@ define([ // NewButton can be undefined if we're in read only mode createNewButton(isInRoot, $toolbar.find('.leftside')); - createTitle(path).appendTo($toolbar.find('.path')); + createTitle($toolbar.find('.path'), path); if (APP.mobile()) { var $context = $('