mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-22 14:23:35 -07:00
WebUI: Access element attribute/property natively in log tables
This commit is contained in:
parent
955688c125
commit
ae91c2f5d6
1 changed files with 8 additions and 4 deletions
|
@ -3258,7 +3258,8 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
initColumnsFunctions: function() {
|
||||
this.columns["timestamp"].updateTd = function(td, row) {
|
||||
const date = new Date(this.getRowValue(row) * 1000).toLocaleString();
|
||||
td.set({ text: date, title: date });
|
||||
td.textContent = date;
|
||||
td.title = date;
|
||||
};
|
||||
|
||||
this.columns["type"].updateTd = function(td, row) {
|
||||
|
@ -3286,7 +3287,8 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
addClass = "logUnknown";
|
||||
break;
|
||||
}
|
||||
td.set({ text: logLevel, title: logLevel });
|
||||
td.textContent = logLevel;
|
||||
td.title = logLevel;
|
||||
td.closest("tr").className = `logTableRow${addClass}`;
|
||||
};
|
||||
},
|
||||
|
@ -3333,7 +3335,8 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
|
||||
this.columns["timestamp"].updateTd = function(td, row) {
|
||||
const date = new Date(this.getRowValue(row) * 1000).toLocaleString();
|
||||
td.set({ text: date, title: date });
|
||||
td.textContent = date;
|
||||
td.title = date;
|
||||
};
|
||||
|
||||
this.columns["blocked"].updateTd = function(td, row) {
|
||||
|
@ -3346,7 +3349,8 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
status = "QBT_TR(Banned)QBT_TR[CONTEXT=ExecutionLogWidget]";
|
||||
addClass = "peerBanned";
|
||||
}
|
||||
td.set({ text: status, title: status });
|
||||
td.textContent = status;
|
||||
td.title = status;
|
||||
td.closest("tr").className = `logTableRow${addClass}`;
|
||||
};
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue