mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-04 14:42:29 -06:00
Merge pull request #8217 from Piccirello/webui-statusbar-freespace
Free disk space in WebUI status bar
This commit is contained in:
@@ -421,6 +421,7 @@ window.addEvent('load', function() {
|
||||
}
|
||||
else
|
||||
document.title = "qBittorrent ${VERSION} QBT_TR(Web UI)QBT_TR[CONTEXT=OptionsDialog]";
|
||||
$('freeSpaceOnDisk').set('html', 'QBT_TR(Free space: %1)QBT_TR[CONTEXT=HttpServer]'.replace("%1", friendlyUnit(serverState.free_space_on_disk)));
|
||||
$('DHTNodes').set('html', 'QBT_TR(DHT: %1 nodes)QBT_TR[CONTEXT=StatusBar]'.replace("%1", serverState.dht_nodes));
|
||||
|
||||
// Statistics dialog
|
||||
|
||||
@@ -12,7 +12,7 @@ function friendlyUnit(value, isSpeed) {
|
||||
"QBT_TR(EiB)QBT_TR[CONTEXT=misc]"
|
||||
];
|
||||
|
||||
if (value < 0)
|
||||
if ((value === undefined) || (value === null) || (value < 0))
|
||||
return "QBT_TR(Unknown)QBT_TR[CONTEXT=misc]";
|
||||
|
||||
var i = 0;
|
||||
|
||||
Reference in New Issue
Block a user