skomerko
411ca0f668
WebUI: Use native function for selecting elements by ID
2025-04-23 19:55:04 +02:00
bolshoytoster
0160aa28b6
WebUI: Don't update UI if the page is hidden
...
Currently, there is unnecessary CPU/network usage by the web UI when it's running in the background, this PR prevents it from refreshing in the background.
Closes #22565 .
PR #22567 .
2025-04-21 17:23:09 +08:00
tehcneko
b4a16f6464
WebUI: Optimize table performance with virtual list
...
Adding virtual list support to dynamic tables to improve performance on large lists, I observed a 100x performance improvement on rendering on a torrent table with 5000 torrents.
This optimization is disabled by default and can be enabled in options.
PR #22502 .
2025-04-20 17:18:26 +08:00
Chocobo1
a9b54d94a0
Merge pull request #22282 from skomerko/webui-v51-fixes
...
WebUI v5.1 fixes
2025-02-21 20:44:42 +08:00
Chocobo1
955688c125
WebUI: replace rounding function from MooTools
...
The `round()` returning floating point number is not a good idea. This is due to floating point
representation is imprecise and sometimes it cannot faithfully represent a number, for example
`0.09 + 0.01 !== 0.1 `. Therefore, it should be avoided and/or utilize other function
to achieve the goal.
Also, improve `window.qBittorrent.Misc.toFixedPointString()` and add test cases.
PR #22281 .
2025-02-17 15:11:55 +08:00
skomerko
f58d6ae984
WebUI: Make context menu target selectors more precise
2025-02-15 10:59:56 +01:00
Chocobo1
f8c48349a1
WebUI: use native function for selecting elements
...
PR #22179 .
2025-01-20 23:36:11 +08:00
Chocobo1
1ee84033ec
WebUI: use template literals instead of string concatenation
...
PR #22177 .
2025-01-18 20:51:47 +08:00
Chocobo1
9c0475ebfa
WebUI: migrate to fetch API
...
This is the final part of it.
PR #22072 .
2024-12-29 15:44:28 +08:00
Chocobo1
7487cd7e6d
WebUI: disallow unnecessary quotes in property name
...
Those two forms are the same and from now on we enforce to one style.
PR #22051 .
2024-12-24 22:25:18 +08:00
Chocobo1
a841fe9320
WebUI: migrate to fetch API
...
And away from mootools.
PR #22037 .
2024-12-22 17:51:19 +08:00
skomerko
14684c8c83
WebUI: Use vanilla JS to create elements
...
All elements are now created using createElement() method:
https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement
PR #21975 .
---------
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com >
2024-12-15 03:31:44 +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
f73f31619d
WebUI: use native function to convert to numbers
...
Also replace `parseInt()` since `Number()` behavior is more intuitive.
PR #21831 .
2024-11-16 15:41:20 +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
Thomas Piccirello
c3c91be578
WebUI: Clear properties panel when torrent no longer selected
...
PR #21654 .
2024-10-28 13:53:24 +08:00
skomerko
0704049026
WebUI: Apply box-sizing reset
...
Box-sizing: border-box is now applied globally. A lot of tiny changes were made but they were necessary to correct resulting inconsistencies. Everything should be pretty much as it was with just some minor exceptions.
Looks like this PR also indirectly fixed #21414 .
PR #21464 .
2024-10-12 14:22:07 +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
skomerko
fda797cb76
WebUI: Improve properties panel
...
It is now possible to expand & collapse it by clicking directly on tabs, just like in GUI.
In addition, collapse state is saved and applied on page load.
Fixed one minor bug and now files search input is properly hidden even when panel is collapsed.
PR #21209 .
2024-08-24 14:09:10 +08:00
skomerko
e069fbc37f
WebUI: Add missing icons
...
This adds missing icons to WebUI (in tabs, buttons, etc.).
PR #21162 .
2024-08-17 13:38:44 +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
Chocobo1
49507ad670
Merge pull request #21123 from skomerko/webui-use-alternating-row-colors
...
WebUI: Add ability to toggle alternating row colors in tables
2024-08-04 17:16:01 +08:00
skomerko
b67495464d
WebUI: Add ability to toggle alternating row colors in tables
2024-07-28 11:34:52 +02:00
Chocobo1
bf7e1516d5
WebUI: clear timer variable properly
...
In JS the timer handle pool is reused and therefore require careful handling of it.
2024-07-26 05:08:40 +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
bf4e0df386
WebUI: unify curly bracket usage
2024-06-07 02:51:35 +08:00
Chocobo1
c54750469e
WebUI: don't auto infer radix parameter
2024-05-27 23:00:51 +08:00
Chocobo1
24a1537cdd
WebUI: prefer arrow function in callbacks
2024-05-27 22:57:28 +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
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
8ef99b336c
Remove 'no cache' directive for POST requests
...
The response for POST request is only cachable under a specific condition and
qbt doesn't use it.
https://developer.mozilla.org/en-US/docs/Glossary/Cacheable
2024-02-11 23:28:44 +08:00
Jimmy Axenhus
c4ed40b82f
Set property instead of set attribute
...
This commit resolves an issue with Safari not properly selecting an `<option>`.
Closes #17866 .
PR #19024 .
2023-08-03 13:34:24 +08:00
Chocobo1
fa30b70453
Fix code defects
2023-03-14 15:04:54 +08:00
loligans
466314675c
WebUI: Add multi-file renaming
...
PR #18287 .
Closes #16239 .
2023-02-19 14:07:55 +03:00
Torsten Schwarz
2109c4e1ae
WebUI: Make rename file dialog resizable
...
PR #18154 .
2022-12-10 10:17:21 +03:00
Chocobo1
2b385e5f92
WebUI: don't disable combobox for file priority
...
Closes #17794 .
PR #17797 .
2022-10-01 12:49:02 +08: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
Thomas Piccirello
32f29e72c6
Support expanding/collapsing Web UI folders with arrow keys
2021-07-11 03:01:31 -07:00
Vladimir Golovnev
37f227ae74
Provide v1 and v2 infohashes in UI ( #15097 )
2021-06-25 20:44:23 +03:00
Chocobo1
121ff2b7be
Apply code formatting
2021-03-26 00:27:52 +08:00
Chocobo1
e43a9de2f3
Make global functions immutable
2021-03-23 18:53:56 +08:00
Vladimir Golovnev (Glassez)
710c5e2c31
WebUI: Correctly represent torrent content structure
2021-01-12 16:13:48 +03:00
Vladimir Golovnev (Glassez)
4453e7fcdd
Improve content file/folder names handling
...
Move files/folders renaming functions to core classes.
Query file/folder for renaming by its current path.
Add ability to rename content folders from WebAPI/WebUI.
2020-12-28 21:18:28 +03:00
Denis
a7eb792372
WebUI: Fix first row renaming in files tab
...
Ids started from zero and first row converts to false.
Closes #11826 .
2020-01-12 20:05:38 +03:00
Chocobo1
c556b20018
Remove unused variable
2020-01-07 02:08:08 +08:00
Chocobo1
c34883f9af
Add explicit semicolon
2020-01-07 02:07:55 +08:00
Thomas Piccirello
2bce9f6179
Add ability to rename torrent files from the WebUI
...
Renaming folders is not yet supported. Closes #8892 .
2019-12-09 02:57:32 -08:00