mirror of https://github.com/xwiki-labs/cryptpad
feedback when logging in or registering
This commit is contained in:
parent
4c3e842664
commit
218f2ff76c
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 () {
|
||||
|
|
Loading…
Reference in New Issue