Add feedback keys

pull/1/head
yflory 5 years ago
parent 81cbb3f6fe
commit 66f2ece08e

@ -2580,7 +2580,7 @@ define([
'target': '_blank',
'rel': 'noopener',
'href': AppConfig.surveyURL,
'class': 'fa fa-graduation-cap'
'class': 'cp-toolbar-survey fa fa-graduation-cap'
},
content: h('span', Messages.survey)
});
@ -2695,6 +2695,9 @@ define([
window.parent.location = origin+'/admin/';
}
});
$userAdmin.find('a.cp-toolbar-survey').click(function () {
Feedback.send('SURVEY_CLICKED');
});
$userAdmin.find('a.cp-toolbar-menu-profile').click(function () {
if (padType) {
window.open(origin+'/profile/');

@ -2121,6 +2121,7 @@ define([
proxy.settings.general.allowUserFeedback = true;
}
returned.feedback = proxy.settings.general.allowUserFeedback;
Feedback.init(returned.feedback);
if (typeof(cb) === 'function') { cb(returned); }

@ -9,6 +9,7 @@ define([
'/common/outer/sharedfolder.js',
'/common/outer/roster.js',
'/common/common-messaging.js',
'/common/common-feedback.js',
'/bower_components/chainpad-listmap/chainpad-listmap.js',
'/bower_components/chainpad-crypto/crypto.js',
@ -18,7 +19,7 @@ define([
'/bower_components/saferphore/index.js',
'/bower_components/tweetnacl/nacl-fast.min.js',
], function (Util, Hash, Constants, Realtime,
ProxyManager, UserObject, SF, Roster, Messaging,
ProxyManager, UserObject, SF, Roster, Messaging, Feedback,
Listmap, Crypto, CpNetflux, ChainPad, nThen, Saferphore) {
var Team = {};
@ -534,6 +535,7 @@ define([
proxy.drive = {};
onReady(ctx, id, lm, roster, keys, cId, function () {
Feedback.send('TEAM_CREATION');
ctx.updateMetadata();
cb();
});
@ -649,6 +651,7 @@ define([
if (err) { console.error(err); }
}));
}).nThen(function () {
Feedback.send('TEAM_DELETION');
closeTeam(ctx, teamId);
cb();
});

Loading…
Cancel
Save