Browse Source

Add missing unit sizes in misc.js

adaptive-webui-19844
sledgehammer999 8 years ago
parent
commit
0addeafc6b
No known key found for this signature in database
GPG Key ID: 6E4A2D025B7CC9A2
  1. 4
      src/webui/www/public/scripts/misc.js

4
src/webui/www/public/scripts/misc.js

@ -8,13 +8,15 @@ function friendlyUnit(value, isSpeed) {
"QBT_TR(MiB)QBT_TR[CONTEXT=misc]", "QBT_TR(MiB)QBT_TR[CONTEXT=misc]",
"QBT_TR(GiB)QBT_TR[CONTEXT=misc]", "QBT_TR(GiB)QBT_TR[CONTEXT=misc]",
"QBT_TR(TiB)QBT_TR[CONTEXT=misc]", "QBT_TR(TiB)QBT_TR[CONTEXT=misc]",
"QBT_TR(PiB)QBT_TR[CONTEXT=misc]",
"QBT_TR(EiB)QBT_TR[CONTEXT=misc]"
]; ];
if (value < 0) if (value < 0)
return "QBT_TR(Unknown)QBT_TR[CONTEXT=misc]"; return "QBT_TR(Unknown)QBT_TR[CONTEXT=misc]";
var i = 0; var i = 0;
while (value >= 1024. && i < 4) { while (value >= 1024. && i < 6) {
value /= 1024.; value /= 1024.;
++i; ++i;
} }

Loading…
Cancel
Save