mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-06 15:42:32 -06:00
This PR adds following improvements: * Remove unused tracker entries while processing sync data * Take into account filter selection & terms when performing 'Start/stop/delete' context actions in filter lists Now, only filtered torrents will be affected by them, just like in the GUI. * Provide better feedback when performing 'Start/stop/delete' context actions in filter lists Small improvement over GUI - now these actions will be disabled if it's not possible to use them. * Add context menu to status filter list * Fix error when toggling filter title Fixup for small bug introduced in https://github.com/qbittorrent/qBittorrent/pull/21269 PR #21438.
123 lines
3.7 KiB
HTML
123 lines
3.7 KiB
HTML
<div id="torrentsTableFixedHeaderDiv" class="dynamicTableFixedHeaderDiv">
|
|
<table class="dynamicTable unselectable" style="position:relative;">
|
|
<thead>
|
|
<tr class="dynamicTableHeader"></tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
|
|
<div id="torrentsTableDiv" class="dynamicTableDiv">
|
|
<table class="dynamicTable unselectable">
|
|
<thead>
|
|
<tr class="dynamicTableHeader"></tr>
|
|
</thead>
|
|
<tbody></tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<script>
|
|
"use strict";
|
|
|
|
window.qBittorrent ??= {};
|
|
window.qBittorrent.TransferList ??= (() => {
|
|
const exports = () => {
|
|
return {
|
|
setup: setup,
|
|
contextMenu: contextMenu,
|
|
};
|
|
};
|
|
|
|
// create a context menu
|
|
const contextMenu = new window.qBittorrent.ContextMenu.TorrentsTableContextMenu({
|
|
targets: ".torrentsTableContextMenuTarget",
|
|
menu: "torrentsTableMenu",
|
|
actions: {
|
|
start: function(element, ref) {
|
|
startFN();
|
|
},
|
|
stop: function(element, ref) {
|
|
stopFN();
|
|
},
|
|
forceStart: function(element, ref) {
|
|
setForceStartFN();
|
|
},
|
|
|
|
delete: function(element, ref) {
|
|
deleteSelectedTorrentsFN();
|
|
},
|
|
|
|
setLocation: function(element, ref) {
|
|
setLocationFN();
|
|
},
|
|
|
|
rename: function(element, ref) {
|
|
renameFN();
|
|
},
|
|
renameFiles: function(element, ref) {
|
|
renameFilesFN();
|
|
},
|
|
queueTop: function(element, ref) {
|
|
setQueuePositionFN("topPrio");
|
|
},
|
|
queueUp: function(element, ref) {
|
|
setQueuePositionFN("increasePrio");
|
|
},
|
|
queueDown: function(element, ref) {
|
|
setQueuePositionFN("decreasePrio");
|
|
},
|
|
queueBottom: function(element, ref) {
|
|
setQueuePositionFN("bottomPrio");
|
|
},
|
|
|
|
downloadLimit: function(element, ref) {
|
|
downloadLimitFN();
|
|
},
|
|
uploadLimit: function(element, ref) {
|
|
uploadLimitFN();
|
|
},
|
|
shareRatio: function(element, ref) {
|
|
shareRatioFN();
|
|
},
|
|
|
|
sequentialDownload: function(element, ref) {
|
|
toggleSequentialDownloadFN();
|
|
},
|
|
firstLastPiecePrio: function(element, ref) {
|
|
toggleFirstLastPiecePrioFN();
|
|
},
|
|
|
|
autoTorrentManagement: function(element, ref) {
|
|
autoTorrentManagementFN();
|
|
},
|
|
forceRecheck: function(element, ref) {
|
|
recheckFN();
|
|
},
|
|
forceReannounce: function(element, ref) {
|
|
reannounceFN();
|
|
},
|
|
|
|
superSeeding: function(element, ref) {
|
|
setSuperSeedingFN(!ref.getItemChecked("superSeeding"));
|
|
},
|
|
|
|
exportTorrent: function(element, ref) {
|
|
exportTorrentFN();
|
|
}
|
|
},
|
|
offsets: {
|
|
x: -15,
|
|
y: 2
|
|
},
|
|
});
|
|
|
|
const setup = () => {
|
|
torrentsTable.setup("torrentsTableDiv", "torrentsTableFixedHeaderDiv", contextMenu);
|
|
};
|
|
|
|
return exports();
|
|
})();
|
|
Object.freeze(window.qBittorrent.TransferList);
|
|
|
|
window.qBittorrent.TransferList.setup();
|
|
</script>
|