|
|
@ -36,8 +36,7 @@ define([
|
|
|
|
ApiConfig,
|
|
|
|
ApiConfig,
|
|
|
|
Backup,
|
|
|
|
Backup,
|
|
|
|
Feedback
|
|
|
|
Feedback
|
|
|
|
)
|
|
|
|
) {
|
|
|
|
{
|
|
|
|
|
|
|
|
var saveAs = window.saveAs;
|
|
|
|
var saveAs = window.saveAs;
|
|
|
|
var APP = window.APP = {};
|
|
|
|
var APP = window.APP = {};
|
|
|
|
|
|
|
|
|
|
|
@ -186,7 +185,8 @@ define([
|
|
|
|
var $input = $('<input>', {
|
|
|
|
var $input = $('<input>', {
|
|
|
|
'type': 'text',
|
|
|
|
'type': 'text',
|
|
|
|
'id': 'cp-settings-displayname',
|
|
|
|
'id': 'cp-settings-displayname',
|
|
|
|
'placeholder': Messages.anonymous}).appendTo($inputBlock);
|
|
|
|
'placeholder': Messages.anonymous
|
|
|
|
|
|
|
|
}).appendTo($inputBlock);
|
|
|
|
var $save = $('<button>', { 'class': 'btn btn-primary' }).text(Messages.settings_save).appendTo($inputBlock);
|
|
|
|
var $save = $('<button>', { 'class': 'btn btn-primary' }).text(Messages.settings_save).appendTo($inputBlock);
|
|
|
|
var $ok = $('<span>', { 'class': 'fa fa-check', title: Messages.saved }).hide().appendTo($div);
|
|
|
|
var $ok = $('<span>', { 'class': 'fa fa-check', title: Messages.saved }).hide().appendTo($div);
|
|
|
|
var $spinner = $('<span>', { 'class': 'fa fa-spinner fa-pulse' }).hide().appendTo($div);
|
|
|
|
var $spinner = $('<span>', { 'class': 'fa fa-spinner fa-pulse' }).hide().appendTo($div);
|
|
|
@ -866,7 +866,8 @@ define([
|
|
|
|
if (err) { return void console.error(err); }
|
|
|
|
if (err) { return void console.error(err); }
|
|
|
|
var sjson = JSON.stringify(data);
|
|
|
|
var sjson = JSON.stringify(data);
|
|
|
|
UI.prompt(Messages.exportPrompt,
|
|
|
|
UI.prompt(Messages.exportPrompt,
|
|
|
|
Util.fixFileName(suggestion) + '.json', function (filename) {
|
|
|
|
Util.fixFileName(suggestion) + '.json',
|
|
|
|
|
|
|
|
function(filename) {
|
|
|
|
if (!(typeof(filename) === 'string' && filename)) { return; }
|
|
|
|
if (!(typeof(filename) === 'string' && filename)) { return; }
|
|
|
|
var blob = new Blob([sjson], { type: "application/json;charset=utf-8" });
|
|
|
|
var blob = new Blob([sjson], { type: "application/json;charset=utf-8" });
|
|
|
|
saveAs(blob, filename);
|
|
|
|
saveAs(blob, filename);
|
|
|
@ -922,7 +923,8 @@ define([
|
|
|
|
if (err) { return void console.error(err); }
|
|
|
|
if (err) { return void console.error(err); }
|
|
|
|
if (data.error) { return void console.error(data.error); }
|
|
|
|
if (data.error) { return void console.error(data.error); }
|
|
|
|
UI.prompt(Messages.settings_backup2Confirm,
|
|
|
|
UI.prompt(Messages.settings_backup2Confirm,
|
|
|
|
Util.fixFileName(suggestion) + '.zip', function (filename) {
|
|
|
|
Util.fixFileName(suggestion) + '.zip',
|
|
|
|
|
|
|
|
function(filename) {
|
|
|
|
if (!(typeof(filename) === 'string' && filename)) { return; }
|
|
|
|
if (!(typeof(filename) === 'string' && filename)) { return; }
|
|
|
|
todo(data, filename);
|
|
|
|
todo(data, filename);
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -1276,12 +1278,6 @@ define([
|
|
|
|
return $div;
|
|
|
|
return $div;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// XXX Messages.settings_padNotifTitle
|
|
|
|
|
|
|
|
// XXX Messages.settings_padNotifHint
|
|
|
|
|
|
|
|
// XXX Messages.settings_padNotifCheckbox ("disable comments notifications")
|
|
|
|
|
|
|
|
Messages.settings_padNotifTitle = "Comments notifications"; // XXX
|
|
|
|
|
|
|
|
Messages.settings_padNotifHint = "Block notifications when someone replies to one of your comments"; // XXX
|
|
|
|
|
|
|
|
Messages.settings_padNotifCheckbox = "Disable comment notifications";
|
|
|
|
|
|
|
|
makeBlock('pad-notif', function(cb) {
|
|
|
|
makeBlock('pad-notif', function(cb) {
|
|
|
|
var $cbox = $(UI.createCheckbox('cp-settings-pad-notif',
|
|
|
|
var $cbox = $(UI.createCheckbox('cp-settings-pad-notif',
|
|
|
|
Messages.settings_padNotifCheckbox,
|
|
|
|
Messages.settings_padNotifCheckbox,
|
|
|
|