feedback when logging in or registering

This commit is contained in:
ansuz 2017-04-24 14:15:17 +02:00
parent 4c3e842664
commit 218f2ff76c
3 changed files with 9 additions and 10 deletions

View File

@ -103,11 +103,13 @@ define([
return;
};
var feedback = common.feedback = function (action) {
if (!action) { return; }
try {
if (!getStore().getProxy().proxy.allowUserFeedback) { return; }
} catch (e) { return void console.error(e); }
var feedback = common.feedback = function (action, force) {
if (force !== true) {
if (!action) { return; }
try {
if (!getStore().getProxy().proxy.allowUserFeedback) { return; }
} catch (e) { return void console.error(e); }
}
var href = '/common/feedback.html?' + action + '=' + (+new Date());
console.log('[feedback] %s', href);

View File

@ -81,6 +81,7 @@ define([
proxy.edPrivate = result.edPrivate;
proxy.edPublic = result.edPublic;
Cryptpad.feedback('LOGIN', true);
Cryptpad.whenRealtimeSyncs(result.realtime, function() {
Cryptpad.login(result.userHash, result.userName, function () {
if (sessionStorage.redirectTo) {

View File

@ -67,11 +67,7 @@ define([
proxy.edPublic = result.edPublic;
proxy.edPrivate = result.edPrivate;
// feedback API won't work because proxy wasn't loaded
$.ajax({
type: 'HEAD',
url: '/common/feedback.html?REGISTRATION=' + (+new Date()),
});
Cryptpad.feedback('REGISTRATION', true);
Cryptpad.whenRealtimeSyncs(result.realtime, function () {
Cryptpad.login(result.userHash, result.userName, function () {