mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-21 16:55:46 +03:00
WebUI: Add colors to 'Status' column in Trackers table
This commit is contained in:
parent
92daca1fef
commit
36ad3b1305
3 changed files with 65 additions and 0 deletions
|
@ -114,3 +114,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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -2023,6 +2023,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;
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue