Fixed table ratio colors

This commit is contained in:
Carve 2023-08-08 23:12:06 -04:00
parent c795f712dc
commit b837fedd97
5 changed files with 453522 additions and 0 deletions

104883
private/icons/icons/icons_rc.py Normal file

File diff suppressed because it is too large Load Diff

104883
private/icons/icons_rc.py Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1221,6 +1221,24 @@ window.qBittorrent.DynamicTable = (function() {
const string = (ratio === -1) ? '∞' : window.qBittorrent.Misc.toFixedPointString(ratio, 2); const string = (ratio === -1) ? '∞' : window.qBittorrent.Misc.toFixedPointString(ratio, 2);
td.set('text', string); td.set('text', string);
td.set('title', string); td.set('title', string);
td.classList.add('ratio');
td.set('class', 'ratio');
// color by percentage
if (string === 0 || string === "0.00") {
td.classList.add('highlight-darkred');
} else if (string > "0" && string <= "0.10") {
td.classList.add('highlight-red');
} else if (string > "0.10" && string <= "0.20") {
td.classList.add('highlight-orange');
} else if (string > "0.20" && string <= "0.40") {
td.classList.add('highlight-yellow');
} else if (string > "0.40" && string <= "0.60") {
td.classList.add('highlight-yellow');
} else if (string > "0.60" && string <= "0.80") {
td.classList.add('highlight-green');
} else if (string > "0.80" && string <= "1.0" || string > "1.0") {
td.classList.add('highlight-brightgreen');
}
}; };
// added on // added on

116474
public/icons/icons_rc.py Normal file

File diff suppressed because it is too large Load Diff

127264
webui_rc.py Normal file

File diff suppressed because it is too large Load Diff