Update UI for trim history

This commit is contained in:
yflory
2020-02-06 11:34:52 +01:00
parent 9a857ea058
commit d8199b8274
2 changed files with 11 additions and 3 deletions

View File

@@ -765,7 +765,7 @@ define([
if (bytes === 0) { return void cb(void 0, $d); }
var formatted = UIElements.prettySize(bytes);
if (!owned || !historyBytes || historyBytes > bytes) {
if (!owned || !historyBytes || historyBytes > bytes || historyBytes < 0) {
$d.append(h('div.cp-app-prop', [Messages.upload_size, h('br'), h('span.cp-app-prop-content', formatted)]));
return void cb(void 0, $d);
}
@@ -801,7 +801,9 @@ define([
var $button = $(button);
$button.click(function () {
UI.confirm(Messages.trimHistory_confirm, function (yes) {
UI.confirmButton(button, {
classes: 'btn-danger'
}, function (yes) {
if (!yes) { return; }
$button.remove();