Chocobo1
f8c48349a1
WebUI: use native function for selecting elements
...
PR #22179 .
2025-01-20 23:36:11 +08:00
Chocobo1
d911928c59
WebUI: Remove unnecessary hashing
...
Now the containers support using string as key so the intermediate hashing/mapping to number
isn't needed now.
PR #22103 .
2025-01-06 18:53:18 +08:00
skomerko
395dbaa5c6
WebUI: Replace getElement with querySelector
...
All `getElement` instances (Mootools) were changed to `querySelector`.
PR #22082 .
2024-12-31 21:31:46 +08:00
skomerko
7080f85b59
WebUI: Replace Mootools class list manipulation methods
...
All `addClass()`, `removeClass()` and `hasClass()` instances were changed to use `classList` equivalent:
https://developer.mozilla.org/en-US/docs/Web/API/Element/classList
PR #21946 .
---------
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com >
2024-12-08 16:12:57 +08:00
Chocobo1
24d349ffba
WebUI: fix wrong event property
2024-11-27 01:12:13 +08:00
Chocobo1
f34787e6ba
WebUI: use correct property for selecting child elements
...
`firstChild` will select the first `Node` which is often not intended (it should be
`Element` instead).
2024-11-27 01:12:12 +08:00
Chocobo1
72e033db79
WebUI: remove child elements directly
2024-11-26 00:43:58 +08:00
skomerko
e51fcc6ea0
WebUI: Show 'Rename...' context menu item only when one torrent is selected
...
'Rename...' item in torrents table menu is displayed only when exactly one torrent is selected.
PR #21843 .
2024-11-17 15:31:30 +08:00
Chocobo1
72cbc83569
WebUI: prefer arrow functions whenever applicable
...
Compared to plain function, arrow function is simpler to understand (without bindings to `this`, `arguments`, `super`) and to read.
Now, plain function will only be used when this object is required.
PR #21691 .
2024-11-01 04:17:41 +08:00
skomerko
5a0914e333
WebUI: Use modern class syntax in context menu classes
...
Context menu classes are now created using vanilla JS syntax (minimal changes to reduce MooTools bits).
PR #21598 .
2024-10-19 16:32:20 +08:00
skomerko
81509dfb65
WebUI: Improve filter lists
...
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 .
2024-10-12 13:40:18 +08:00
Thomas Piccirello
b1fd61af3a
WebUI: Handle folders when updating RSS feed url
...
Follow up to #21371 ([context](https://github.com/qbittorrent/qBittorrent/pull/21371#discussion_r1780908605 )).
PR #21437 .
2024-10-12 13:30:24 +08:00
skomerko
8b2d8f3afd
WebUI: Use Map instead of Mootools Hash in all dynamic tables
...
PR #21358 .
2024-09-28 15:46:16 +08:00
Thomas Piccirello
d2b2afad23
Support removing tracker from all torrents in WebUI/WebAPI
...
Closes #20661 .
PR #21056 .
2024-09-16 17:47:10 +08:00
skomerko
d19f7b12d9
WebUI: Improve hash copy actions in context menu
...
This PR provides better feedback for hash context menu actions and now it is clearly shown if there is anything to copy.
PR #21321 .
2024-09-16 17:41:14 +08:00
Chocobo1
0e63b83aed
WebUI: do not follow anchor URL
...
Fix up 5afeecbf18 .
PR #21283 .
2024-09-06 15:31:26 +08:00
skomerko
5b7c9d5725
WebUI: Filter list improvements
...
A couple of tweaks to make them a little bit better:
1. Make highlighting functions more consistent (this also fixes minuscule bug when no filter item in tracker list is highlighted due to a type mismatch)
2. Use [event delegation](https://javascript.info/event-delegation ) to handle filter toggling & item selection
3. Other minor improvements (everything should work like it was previously)
PR #21191 .
2024-08-25 14:23:35 +08:00
Chocobo1
98623b2cf7
WebUI: use passive event handlers
...
These kind of event handlers can be asynchronously dispatched, freeing up the main thread for
lag-free operation.
2024-08-17 14:03:51 +08:00
Chocobo1
1179fc3de3
WebUI: prevent passing wrong parameter
...
The `event` object will be passed as the first parameter to the event handler. So wrap the
event handler with a closure to prevent `event` leaking to other functions.
2024-08-17 14:02:13 +08:00
Chocobo1
3e18b1d30c
WebUI: remove outdated CSS property
...
WebUI already has the standard counterparts.
2024-08-10 14:26:10 +08:00
Chocobo1
9df3ee0de8
WebUI: use native property to set styles
2024-08-10 14:26:10 +08:00
Chocobo1
5afeecbf18
WebUI: migrate away from inline HTML code
...
`innerHTML` & `outerHTML` setter will more or less evaluate the value which could be used to
inject malicious code. So replace them with safer alternatives.
PR #21163 .
2024-08-10 12:55:48 +08:00
Chocobo1
2d9e3b3330
WebUI: use native functions for event handling
...
PR #21147 .
2024-08-07 22:00:54 +08:00
skomerko
142780b863
WebUI: Highlight torrent category in context menu
...
This PR makes it possible to see common category of selected torrents in context menu. Everything should behave exactly like in GUI.
Closes #12701 .
PR #21136 .
2024-08-07 21:40:21 +08:00
Chocobo1
9feefc8144
WebUI: avoid redundant re-initialization
...
PR #21012 .
2024-07-12 15:00:36 +08:00
Chocobo1
9c26e5d4d6
WebUI: access attribute/property natively
...
It is now clearer to see what property is being accessed.
Previously mootools library would re-map attribute/property to another.
PR #21007 .
2024-07-12 14:06:59 +08:00
Chocobo1
648dd9988d
WebUI: unify comment format
2024-06-11 02:17:10 +08:00
Chocobo1
bf4e0df386
WebUI: unify curly bracket usage
2024-06-07 02:51:35 +08:00
Chocobo1
24a1537cdd
WebUI: prefer arrow function in callbacks
2024-05-27 22:57:28 +08:00
Chocobo1
55bff4f07a
WebUI: enforce usage of const whenever possible
2024-05-27 22:56:51 +08:00
Chocobo1
cb90b6769c
WebUI: enforce string quotes coding style
2024-05-27 22:50:17 +08:00
Chocobo1
4945ed576a
WebUI: enforce strict comparison operators
2024-04-21 16:44:15 +08:00
Chocobo1
d7cded54e4
WebUI: enforce parentheses around operators
...
PR #20696 .
2024-04-15 12:50:07 +08:00
Thomas Piccirello
e697d40382
WebUI: Improve table scrolling and selection on mobile
...
This PR improves touch interaction with table rows that have a context menu. Previously, those rows couldn't be selected or scrolled on mobile. Additionally, this PR modifies the context menu to appear when the user removes their finger/touch, rather than the current behavior of appearing mid-touch. This allows us to only display the context menu if the user's finger remains on the same element, which should significantly reduce erroneous context menu triggering.
Closes #19819 .
Closes #19820 ,
Closes #19823 .
PR #20639 .
2024-04-09 14:33:10 +08:00
thalieht
5d1c249606
Use Start/Stop instead of Resume/Pause
...
PR #20532 .
---------
Co-authored-by: Vladimir Golovnev (Glassez) <glassez@yandex.ru >
2024-03-25 19:11:04 +03:00
Chocobo1
15697f904d
Add a small delay before processing the key input of search boxes
...
PR #20465 .
Closes #20025 .
Closes #20235 .
2024-02-27 12:57:55 +08:00
Chocobo1
9bfb447dd3
Improve WebUI responsiveness
...
This migrates Category and Tag to `Map` type from `Object` type. And done some algorithm and data structure optimization.
PR #20297 .
2024-01-27 22:04:39 +08:00
Chocobo1
00372dd559
Use natural sorting in WebUI
...
Also change case sensitivity to the default of 'sort' mode.
PR #20264 .
2024-01-15 13:12:36 +08:00
Chocobo1
86d5d13ce6
Migrate away from deprecated functions
...
Those functions are deprecated in mootools.
2023-11-27 13:29:54 +08:00
brvphoenix
9fde5634f1
Fix JS memory leak
...
The memory leak can be reproduced easily by opening two web pages of qbittorrent so that the WebUI pages are updated with full_update = true. If you have a large number of torrents, such as 100 torrents, you can observe a rapid increase in memory usage.
This is caused by the incorrect usage of dispose and empty methods in the js codes and none of them garbage collect the elements. If event listeners are added to the DOM elements, those DOM elements will not be garbage collected at all event if they are not referenced or out of the scope, which will cause memory leaks. If some elements are expected to be removed, the correct way is to use destroy method instead.
https://github.com/mootools/mootools-core/blob/master/Docs/Element/Element.md#element-method-dispose-elementdispose
https://github.com/mootools/mootools-core/blob/master/Docs/Element/Element.md#element-method-empty-elementempty
https://github.com/mootools/mootools-core/blob/master/Docs/Element/Element.md#element-method-destroy-elementdestroy
Closes #19034 .
PR #19969 .
2023-11-25 13:50:45 +08:00
Bartu Özen
b55d4b1733
WebUI: Implement subcategories
...
PR #18740 .
2023-04-02 11:02:22 +03:00
loligans
466314675c
WebUI: Add multi-file renaming
...
PR #18287 .
Closes #16239 .
2023-02-19 14:07:55 +03:00
Chocobo1
ca274635d5
Make WebUI images self-contained
2022-08-27 13:55:04 +08:00
Nowshed H. Imran
199d770e15
Implement new icon/color theme
...
Co-authored-by: xavier2k6 <42386382+xavier2k6@users.noreply.github.com >
2022-06-09 18:18:14 +06:00
Chocobo1
dbfd6a2368
WebUI: enforce coding style
...
Actually, not all of them but some that can be enforced by eslint.
The changes are made by eslint with minor manual tweaking.
PR #17046 .
2022-05-18 11:37:05 +08:00
Chocobo1
e43a9de2f3
Make global functions immutable
2021-03-23 18:53:56 +08:00
Chocobo1
7e258bfe38
Fix typos
2020-10-20 18:56:30 +08:00
Sepro
2b3c92a4a8
WebUI: Add RSS functionality
...
Implemented RSS Reader and AutoDownloader in reference WebUI.
2020-05-22 14:21:45 +02:00
Chocobo1
02c25dbe2a
Move WebUI icons to its own folder
...
After this change: "http://<server>/icons" will point to "src/icons"
folder and "http://<server>/images" points to the real "images" folder
in the relative path.
2020-05-19 14:58:49 +08:00
jagannatharjun
ab91d546e5
Move all icon resources to icon folder root
2020-05-18 20:30:51 +05:30