remove XXXs related to keys

pull/1/head
David Benqué 5 years ago
parent d9ab8d3f62
commit 64964e1f80

@ -602,13 +602,12 @@ define([
UI.confirmButton = function (originalBtn, config, _cb) { UI.confirmButton = function (originalBtn, config, _cb) {
config = config || {}; config = config || {};
var cb = Util.once(Util.mkAsync(_cb)); var cb = Util.once(Util.mkAsync(_cb));
var classes = 'btn ' + (config.classes || 'btn-primary'); var classes = 'btn ' + (config.classes || 'btn-primary');
var button = h('button', { var button = h('button', {
"class": classes, "class": classes,
title: config.title || '' title: config.title || ''
}, Messages.areYouSure || "Are you sure?"); // XXX }, Messages.areYouSure);
var $button = $(button); var $button = $(button);
var div = h('div', { var div = h('div', {

@ -797,8 +797,6 @@ define([
return void cb(void 0, $d); return void cb(void 0, $d);
} }
Messages.historyTrim_historySize = 'History: {0}'; // XXX
Messages.historyTrim_contentsSize = 'Contents: {0}'; // XXX
var p = Math.round((historyBytes / bytes) * 100); var p = Math.round((historyBytes / bytes) * 100);
var historyPrettySize = UIElements.prettySize(historyBytes); var historyPrettySize = UIElements.prettySize(historyBytes);
@ -821,7 +819,7 @@ define([
h('span.cp-app-prop-content', Messages._getKey('historyTrim_contentsSize', [contentsPrettySize])) h('span.cp-app-prop-content', Messages._getKey('historyTrim_contentsSize', [contentsPrettySize]))
]), ]),
]), ]),
button = h('button.btn.btn-danger-alt.no-margin', Messages.trimHistory_button || 'test'), // XXX button = h('button.btn.btn-danger-alt.no-margin', Messages.trimHistory_button),
spinner.spinner spinner.spinner
]); ]);
$d.append(size); $d.append(size);
@ -842,7 +840,7 @@ define([
}, function (obj) { }, function (obj) {
spinner.hide(); spinner.hide();
if (obj && obj.error) { if (obj && obj.error) {
$(size).append(h('div.alert.alert-danger', Messages.trimHistory_error || 'error')); // XXX $(size).append(h('div.alert.alert-danger', Messages.trimHistory_error));
return; return;
} }
$(size).remove(); $(size).remove();

@ -1215,7 +1215,7 @@ define([
var spinner = UI.makeSpinner(); var spinner = UI.makeSpinner();
var button = h('button.btn.btn-danger-alt', { var button = h('button.btn.btn-danger-alt', {
disabled: 'disabled' disabled: 'disabled'
}, Messages.trimHistory_button || 'delete history... xxx'); // XXX }, Messages.trimHistory_button);
var currentSize = h('p', $(spinner.spinner).clone()[0]); var currentSize = h('p', $(spinner.spinner).clone()[0]);
var content = h('div#cp-settings-trim-container', [ var content = h('div#cp-settings-trim-container', [
currentSize, currentSize,
@ -1226,7 +1226,7 @@ define([
if (!privateData.isDriveOwned) { if (!privateData.isDriveOwned) {
var href = privateData.origin + privateData.pathname + '#' + 'account'; var href = privateData.origin + privateData.pathname + '#' + 'account';
$(currentSize).html(Messages.trimHistory_needMigration || 'Need migration <a>Click</a>'); // XXX $(currentSize).html(Messages.trimHistory_needMigration);
$(currentSize).find('a').prop('href', href).click(function (e) { $(currentSize).find('a').prop('href', href).click(function (e) {
e.preventDefault(); e.preventDefault();
$('.cp-sidebarlayout-category[data-category="account"]').click(); $('.cp-sidebarlayout-category[data-category="account"]').click();
@ -1234,7 +1234,6 @@ define([
return void cb(content); return void cb(content);
} }
Messages.trimHistory_currentSize = 'Size XXX: <b>{0}</b>'; // XXX
var $button = $(button); var $button = $(button);
var size; var size;
@ -1255,12 +1254,11 @@ define([
})); }));
}).nThen(function () { }).nThen(function () {
if (!size || size < 1024) { if (!size || size < 1024) {
$(currentSize).html(Messages.trimHistory_noHistory || 'no history...'); // XXX $(currentSize).html(Messages.trimHistory_noHistory);
return; return;
} }
$(currentSize).html(Messages._getKey('trimHistory_currentSize', [UIElements.prettySize(size)])); $(currentSize).html(Messages._getKey('trimHistory_currentSize', [UIElements.prettySize(size)]));
$button.click(function () { $button.click(function () {
//UI.confirm(Messages.trimHistory_confirm, function (yes) {
UI.confirmButton(button, { UI.confirmButton(button, {
classes: 'btn-danger' classes: 'btn-danger'
}, function (yes) { }, function (yes) {
@ -1272,7 +1270,7 @@ define([
channels: channels channels: channels
}, function (obj) { }, function (obj) {
if (obj && obj.error) { if (obj && obj.error) {
var error = h('div.alert.alert-danger', Messages.trimHistory_error || 'error'); // XXX var error = h('div.alert.alert-danger', Messages.trimHistory_error);
$(content).empty().append(error); $(content).empty().append(error);
return; return;
} }
@ -1288,9 +1286,6 @@ define([
}; };
makeBlock('trim-history', function (cb, $div) { makeBlock('trim-history', function (cb, $div) {
if (!common.isLoggedIn()) { return; } if (!common.isLoggedIn()) { return; }
// XXX settings_trimHistoryTitle, settings_trimHistoryHint, trimHistory_button, trimHistory_error
// XXX trimHistory_success, trimHistory_confirm, trimHistory_noHistory
// XXX trimHistory_needMigration (clickable <a> tag (no attribute) to go to the "account" part of settings)
redrawTrimHistory(cb, $div); redrawTrimHistory(cb, $div);
}, true); }, true);

Loading…
Cancel
Save