diff --git a/src/webui/www/private/css/dynamicTable.css b/src/webui/www/private/css/dynamicTable.css index ae0b75906..2cc9c7626 100644 --- a/src/webui/www/private/css/dynamicTable.css +++ b/src/webui/www/private/css/dynamicTable.css @@ -110,3 +110,26 @@ div:has(> div.dynamicTableFixedHeaderDiv):not(.invisible) { padding-bottom: 0px !important; padding-top: 0px !important; } + +/* Trackers table */ +#torrentTrackersTableDiv tr:not(.selected, :hover) { + & .trackerDisabled { + color: var(--color-tracker-disabled); + } + + & .trackerNotContacted { + color: var(--color-tracker-not-contacted); + } + + & .trackerWorking { + color: var(--color-tracker-working); + } + + & .trackerUpdating { + color: var(--color-tracker-updating); + } + + & .trackerNotWorking { + color: var(--color-tracker-not-working); + } +} diff --git a/src/webui/www/private/css/style.css b/src/webui/www/private/css/style.css index 116f4948a..752e9408f 100644 --- a/src/webui/www/private/css/style.css +++ b/src/webui/www/private/css/style.css @@ -19,6 +19,14 @@ --color-icon-hover: brightness(0) invert(100%) sepia(100%) saturate(0%) hue-rotate(108deg) brightness(104%) contrast(104%); + & #torrentTrackersTableDiv tr { + --color-tracker-disabled: hsl(240deg 4% 46%); + --color-tracker-not-contacted: hsl(32deg 95% 44%); + --color-tracker-working: hsl(142deg 76% 36%); + --color-tracker-updating: hsl(210deg 100% 55%); + --color-tracker-not-working: hsl(0deg 100% 65%); + } + &:not(.dark) { color-scheme: light; } @@ -34,6 +42,14 @@ --color-background-hover: hsl(26deg 50% 55%); --color-border-default: hsl(0deg 0% 33%); + & #torrentTrackersTableDiv tr { + --color-tracker-disabled: hsl(240deg 6% 83%); + --color-tracker-not-contacted: hsl(39deg 100% 72%); + --color-tracker-working: hsl(142deg 69% 58%); + --color-tracker-updating: hsl(210deg 88.1% 73.5%); + --color-tracker-not-working: hsl(0deg 100% 71%); + } + color-scheme: dark; #rssButtonBar img, diff --git a/src/webui/www/private/scripts/dynamicTable.js b/src/webui/www/private/scripts/dynamicTable.js index 47f4899c1..624cc6701 100644 --- a/src/webui/www/private/scripts/dynamicTable.js +++ b/src/webui/www/private/scripts/dynamicTable.js @@ -2034,6 +2034,32 @@ window.qBittorrent.DynamicTable ??= (() => { this.columns["seeds"].compareRows = sortMixed; this.columns["leeches"].compareRows = sortMixed; this.columns["downloaded"].compareRows = sortMixed; + + this.columns["status"].updateTd = function(td, row) { + let statusClass = "trackerUnknown"; + const status = this.getRowValue(row); + switch (status) { + case "QBT_TR(Disabled)QBT_TR[CONTEXT=TrackerListWidget]": + statusClass = "trackerDisabled"; + break; + case "QBT_TR(Not contacted yet)QBT_TR[CONTEXT=TrackerListWidget]": + statusClass = "trackerNotContacted"; + break; + case "QBT_TR(Working)QBT_TR[CONTEXT=TrackerListWidget]": + statusClass = "trackerWorking"; + break; + case "QBT_TR(Updating...)QBT_TR[CONTEXT=TrackerListWidget]": + statusClass = "trackerUpdating"; + break; + case "QBT_TR(Not working)QBT_TR[CONTEXT=TrackerListWidget]": + statusClass = "trackerNotWorking"; + break; + } + + td.className = statusClass; + td.textContent = status; + td.title = status; + }; } });