From 424a14625d2363dd87a19c50a53fbc18761867ab Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 8 Jan 2019 15:17:43 +0100 Subject: [PATCH 1/2] add feedback keys for password change and drive migration --- www/common/common-feedback.js | 10 +++++----- www/common/cryptpad-common.js | 8 ++++++-- www/settings/inner.js | 1 + 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/www/common/common-feedback.js b/www/common/common-feedback.js index 6d2c62e30..f0b7d989b 100644 --- a/www/common/common-feedback.js +++ b/www/common/common-feedback.js @@ -21,15 +21,15 @@ define([ }; http.send(); }; - Feedback.send = function (action, force) { - if (AppConfig.disableFeedback) { return; } - if (!action) { return; } + Feedback.send = function (action, force, cb) { + if (AppConfig.disableFeedback) { return void cb(); } + if (!action) { return void cb(); } if (force !== true) { - if (!Feedback.state) { return; } + if (!Feedback.state) { return void cb(); } } var href = '/common/feedback.html?' + action + '=' + randomToken(); - ajax(href); + ajax(href, cb); }; Feedback.reportAppUsage = function () { diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 61e8b3a71..0b72dccbc 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -89,7 +89,6 @@ define([ value: token }, function (obj) { if (obj && obj.error) { return void cb(obj.error); } - Feedback.send('LOGOUT_EVERYWHERE'); cb(); }); }; @@ -934,7 +933,12 @@ define([ } }).nThen(function () { // We have the new drive, with the new login block - window.location.reload(); + var feedbackKey = (password === newPassword)? + 'OWNED_DRIVE_MIGRATION': 'PASSWORD_CHANGED'; + + Feedback.send(feedbackKey, undefined, function () { + window.location.reload(); + }); }); }; diff --git a/www/settings/inner.js b/www/settings/inner.js index 7f700f959..4b1836e64 100644 --- a/www/settings/inner.js +++ b/www/settings/inner.js @@ -212,6 +212,7 @@ define([ $spinner.show(); $ok.hide(); + Feedback.send('LOGOUT_EVERYWHERE'); sframeChan.query('Q_SETTINGS_LOGOUT', null, function () { $spinner.hide(); $ok.show(); From 34608a048451f3ae1f815d647341fc31cfb34f32 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 8 Jan 2019 15:29:50 +0100 Subject: [PATCH 2/2] update footer and version --- customize.dist/pages.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/customize.dist/pages.js b/customize.dist/pages.js index c8ae8988b..04a47e202 100644 --- a/customize.dist/pages.js +++ b/customize.dist/pages.js @@ -91,7 +91,7 @@ define([ ]) ]) ]), - h('div.cp-version-footer', "CryptPad v2.14.0 (Opossum)") + h('div.cp-version-footer', "CryptPad v2.15.0 (Pademelon)") ]); }; diff --git a/package.json b/package.json index b6456cf4c..1768001b7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "cryptpad", "description": "realtime collaborative visual editor with zero knowlege server", - "version": "2.14.0", + "version": "2.15.0", "license": "AGPL-3.0+", "repository": { "type": "git",