provide UI for disabling the user feedback api

pull/1/head
ansuz 8 years ago
parent 1a259bb3aa
commit a4913f2f4b

@ -255,7 +255,10 @@ define(function () {
out.settings_resetTips = "Tips in CryptDrive"; out.settings_resetTips = "Tips in CryptDrive";
out.settings_resetTipsButton = "Reset the available tips in CryptDrive"; out.settings_resetTipsButton = "Reset the available tips in CryptDrive";
out.settings_resetTipsDone = "All the tips are now visible again."; out.settings_resetTipsDone = "All the tips are now visible again.";
out.settings_userFeedback = "disable user feedback";
out.settings_userFeedbackHint1 = "CryptPad provides some very basic feedback to the server, to let us know how to improve your experience.";
out.settings_userFeedbackHint2 = "Your pad's content will never be shared with the server.";
out.settings_userFeedback = "Disable user feedback";
// index.html // index.html

@ -9,7 +9,7 @@ define([
var USERNAME_KEY = 'cryptpad.username'; var USERNAME_KEY = 'cryptpad.username';
var APP = { var APP = window.APP = {
Cryptpad: Cryptpad, Cryptpad: Cryptpad,
_onRefresh: [] _onRefresh: []
}; };
@ -173,14 +173,18 @@ define([
var $label = $('<label>', { 'for': 'userFeedback'}) var $label = $('<label>', { 'for': 'userFeedback'})
.text(Messages.settings_userFeedback); .text(Messages.settings_userFeedback);
$div.html('<hr />' + Messages.settings_userFeedbackHint1 + '<br />' +
Messages.settings_userFeedbackHint2).appendTo($div);
$('<br>').appendTo($div); $('<br>').appendTo($div);
var $checkbox = $('<input>', { var $checkbox = $('<input>', {
'type': 'checkbox', 'type': 'checkbox',
}).on('change', function () { }).on('change', function () {
obj.proxy.allowUserFeedback = $checkbox.is(':checked') || false; obj.proxy.allowUserFeedback = $checkbox.is(':checked') || false;
console.log("wut");
console.log($box.is(':checked')); // TODO provide feedback to show if this is synced
settle(function () {});
}); });
$checkbox.appendTo($div); $checkbox.appendTo($div);

Loading…
Cancel
Save