mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Merge remote-tracking branch 'origin/admin-warning-1176' into staging
This commit is contained in:
commit
24b94dc8e4
@ -2091,11 +2091,16 @@ Example
|
||||
onRefreshStats.reg(onRefresh);
|
||||
return $div;
|
||||
};
|
||||
|
||||
Messages.admin_diskUsageWarning = "Depending on the size of the data stored on your instance, generating this report can consume all the memory available on your server and lead to a crash. Use with caution!"; // XXX
|
||||
create['disk-usage'] = function () {
|
||||
var key = 'disk-usage';
|
||||
var $div = makeBlock(key, true); // Msg.admin_diskUsageHint, .admin_diskUsageTitle, .admin_diskUsageButton
|
||||
var called = false;
|
||||
|
||||
$div.find('button').click(function () {
|
||||
UI.confirm(Messages.admin_diskUsageWarning, function (yes) {
|
||||
if (!yes) { return; }
|
||||
$div.find('button').hide();
|
||||
if (called) { return; }
|
||||
called = true;
|
||||
@ -2125,6 +2130,8 @@ Example
|
||||
})));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
return $div;
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user