add feedback keys for password change and drive migration
This commit is contained in:
parent
ab832f38b7
commit
424a14625d
@ -21,15 +21,15 @@ define([
|
|||||||
};
|
};
|
||||||
http.send();
|
http.send();
|
||||||
};
|
};
|
||||||
Feedback.send = function (action, force) {
|
Feedback.send = function (action, force, cb) {
|
||||||
if (AppConfig.disableFeedback) { return; }
|
if (AppConfig.disableFeedback) { return void cb(); }
|
||||||
if (!action) { return; }
|
if (!action) { return void cb(); }
|
||||||
if (force !== true) {
|
if (force !== true) {
|
||||||
if (!Feedback.state) { return; }
|
if (!Feedback.state) { return void cb(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
var href = '/common/feedback.html?' + action + '=' + randomToken();
|
var href = '/common/feedback.html?' + action + '=' + randomToken();
|
||||||
ajax(href);
|
ajax(href, cb);
|
||||||
};
|
};
|
||||||
|
|
||||||
Feedback.reportAppUsage = function () {
|
Feedback.reportAppUsage = function () {
|
||||||
|
|||||||
@ -89,7 +89,6 @@ define([
|
|||||||
value: token
|
value: token
|
||||||
}, function (obj) {
|
}, function (obj) {
|
||||||
if (obj && obj.error) { return void cb(obj.error); }
|
if (obj && obj.error) { return void cb(obj.error); }
|
||||||
Feedback.send('LOGOUT_EVERYWHERE');
|
|
||||||
cb();
|
cb();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -934,7 +933,12 @@ define([
|
|||||||
}
|
}
|
||||||
}).nThen(function () {
|
}).nThen(function () {
|
||||||
// We have the new drive, with the new login block
|
// 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();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -212,6 +212,7 @@ define([
|
|||||||
$spinner.show();
|
$spinner.show();
|
||||||
$ok.hide();
|
$ok.hide();
|
||||||
|
|
||||||
|
Feedback.send('LOGOUT_EVERYWHERE');
|
||||||
sframeChan.query('Q_SETTINGS_LOGOUT', null, function () {
|
sframeChan.query('Q_SETTINGS_LOGOUT', null, function () {
|
||||||
$spinner.hide();
|
$spinner.hide();
|
||||||
$ok.show();
|
$ok.show();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user