mirror of
https://github.com/Carve/qbittorrent-webui-cjratliff.com.git
synced 2025-02-28 07:30:36 +01:00
Fixed table ratio colors
This commit is contained in:
parent
c795f712dc
commit
b837fedd97
104883
private/icons/icons/icons_rc.py
Normal file
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
104883
private/icons/icons_rc.py
Normal file
File diff suppressed because it is too large
Load Diff
@ -1221,6 +1221,24 @@ window.qBittorrent.DynamicTable = (function() {
|
||||
const string = (ratio === -1) ? '∞' : window.qBittorrent.Misc.toFixedPointString(ratio, 2);
|
||||
td.set('text', 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
|
||||
|
116474
public/icons/icons_rc.py
Normal file
116474
public/icons/icons_rc.py
Normal file
File diff suppressed because it is too large
Load Diff
127264
webui_rc.py
Normal file
127264
webui_rc.py
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user