Commit graph

13037 commits

Author SHA1 Message Date
Evgenii Ryshkov
1e851b3637
WebUI: Fix reloading page after login
PR  #21832.
---------

Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
2024-11-19 02:20:04 +08:00
skomerko
c9c85eeb95
WebUI: Use event delegation to handle common table events
Event delegation is now used to handle basic table events.
2 minor fixes were added to match GUI behavior:
* Clicking on the table body deselects everything
* Table rows are now scrolled into view when using up/down arrows

PR #21829.
2024-11-19 02:12:26 +08:00
Vladimir Golovnev
ea35aa45d6
Remove wrong dependency on Main Window
Don't depend on upper level widget (Main Window) state.

PR #21816.
2024-11-18 19:13:43 +03: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
f4eec75488
Don't apply Mark-of-the-Web on existing files
`TorrentImpl::isDownloading()` was excessively broad which included unexpected events for the
case here. So use the underlying state directly.

Closes #21788.
PR #21836.
2024-11-16 15:57:55 +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
ede08f3845
WebUI: fetch cached info early
The cached info doesn't need to wait until the DOM is loaded. They can be fetched far earlier.

PR #21830.
2024-11-16 15:34:35 +08:00
Patrik Elfström
c9a55fce95
WebUI: Fix wrong log levels
Fixes bug where the first time visiting Execution Log view all log levels are deselected but log items with all levels are still displayed.
This requires you to select a log level and then deselect it to hide that log level.

PR #21812.
2024-11-16 15:22:26 +08:00
Thomas Piccirello
1cd3c586c1
WebUI: Always close one window
Closing all windows is overly broad and never the intention.

PR #21804.
2024-11-16 15:12:35 +08:00
Chocobo1
0f12d077c8
Avoid reapplying Mark-of-the-Web when it already exists
Also use scope guards to handle resources.

Related #21788.
PR #21806.
2024-11-14 15:06:33 +08:00
Chocobo1
92daca1fef
Avoid redundant string length scan
PR #21807.
2024-11-11 19:19:10 +08:00
skomerko
889df72ab3
WebUI: Use thin scrollbars
Thin scrollbars are now used if they are supported by user's browser. The main goal was to make them less intrusive in Chrome-likes on some platforms.

PR #21763.
---------

Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
2024-11-11 19:05:42 +08:00
Hanabishi
631e873ff2
WebUI: fix preferences class name
Fixup for #21780. Account for changed preferences class name in the color scheme logic.

PR #21809.
2024-11-11 18:53:06 +08:00
Vladimir Golovnev
69f19d4a0b
Preserve initial torrent progress while checking resume data
PR #21784.
2024-11-10 12:01:12 +03:00
skomerko
3ec645674a
WebUI: Use modern class syntax to create LocalPreferences class
LocalPreferences class is now created using modern class syntax (minimal changes to remove Mootools bits). In addition, I removed redundant suffix from class name.

PR #21780.
2024-11-09 16:40:25 +08:00
skomerko
71f83cf9ba
WebUI: Display torrent progress percentage in General tab
This PR adds torrent progress percentage next to pieces bar in General tab, as in the GUI.

PR #21756.
2024-11-09 16:03:20 +08:00
Hanabishi
06fe3e5fb0
WebUI: fix color scheme for iframes
Applies the color scheme for iframe dialogs.

Fixup for #21613.
PR #21750.
2024-11-09 16:02:28 +08:00
3gf8jv4dv
fe153f8919
NSIS: Update Traditional Chinese translation
PR #21694.

---------

Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
2024-11-09 16:01:02 +08:00
3gf8jv4dv
568de90923
NSIS: Update Simplified Chinese translation
PR #21693.

---------

Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
2024-11-09 16:00:31 +08:00
Thomas Piccirello
f89c4c32ed
Display External IP Address in status bar
This change displays the last detected IPv4 and/or IPv6 address(es) in the GUI and WebUI's status bar. This does not yet handle systems with multiple addresses of the same type (e.g. multiple IPv6 addresses).

PR #21383.

---------

Co-authored-by: Odin Vex <44311901+OdinVex@users.noreply.github.com>
2024-11-09 15:58:13 +08:00
Chocobo1
fb9b3c0f34
WebUI: use Fetch API to login
Fetch API is the modern replacement for XMLHttpRequest.
Also show more detailed error messages. 

Closes #21739.
PR #21744.
2024-11-09 14:08:03 +08:00
Vladimir Golovnev
33e3fb2f46
Correctly handle "torrent finished" events
PR #21786.
Closes #21699.
2024-11-08 11:45:57 +03:00
Vladimir Golovnev
4bec9b90c4
Check real palette darkness to detect "dark theme"
`QStyleHints::colorScheme()` returns chosen color scheme even if current style doesn't support it and uses different palette.

PR #21771.
2024-11-08 11:45:16 +03:00
Vladimir Golovnev
a6c7aef6c1
Optimize checking for outdated tracker endpoints
PR #21768.
2024-11-07 09:40:33 +03:00
Vladimir Golovnev
4527536858
Optimize converting TCP endpoints to strings
There may be quite a few endpoint names (one for each available network card), and they usually remain unchanged throughout the session, while previously producing such names was performed every time they were accessed. Now they are retrieved from the cache.

PR #21770.
2024-11-07 09:39:33 +03:00
Chocobo1
3da9444688
Reduce dependency on Main Window
PR #21753.
2024-11-06 13:45:14 +08:00
Vladimir Golovnev
75d1ac8889
Optimize conversion of time points from libtorrent to Qt clocks
Obtain current date time of Qt and libtorrent clocks only once
for processing entire current libtorrent alerts bunch.

PR #21764.
2024-11-05 16:43:43 +03:00
Chocobo1
051d7137ea
Use proper macro for unreachable switch cases
Those are the `default` cases which are not expected to hit (nor reachable) normally.

When the code is compiled with release mode and it reaches `Q_UNREACHABLE()`, it becomes
undefined behavior. So it rely on the developers to catch the errors in debug mode.
The upside of this is that the `switch` statement will be more optimized than not using it.
This also means the statements after `Q_UNREACHABLE()` isn't important. It allow anything to
preserve the intention of the code.

This macro is preferred over C++23 `std::unreachable` because it will automatically insert a
`Q_ASSERT(false)` with it.

PR #21752.
2024-11-05 11:55:55 +08:00
Vladimir Golovnev
b462a2bf0c
Reset tracker entries when pause the session
PR #21738.
2024-11-04 16:27:21 +03:00
Patrik Elfström
c02f80cec5
WebUI: Hide context menu when clicking on a table row
This fixes a bug where the torrents table header menu
could not be closed by clicking on a table row.
This also fixes the same bug for other context menus.

PR #21731.
2024-11-04 19:09:51 +08:00
Patrik Elfström
3bb1e34233
WebUI: Add tooltip to regex filter button
Add a tooltip to indicate the button's function.
And change the cursor to a pointer since label is used as a button.

PR #21695.
2024-11-03 15:35:28 +08:00
Thomas Piccirello
dc30b9c2ec
WebUI: Improve table overflow handling
This PR relies on flexbox to ensure all WebUI tables are the correct height without overflowing. Table headers are now always visible and JS-based dynamic resizing is no longer needed.

PR #21652.
2024-11-03 15:11:30 +08:00
Vladimir Golovnev
b083029841
Handle Qt style names in a case insensitive way
PR #21720.
Closes #21716.
2024-11-03 09:54:57 +03:00
Chocobo1
6f642776b6
Simplify tab handling in Search widget
PR #21729.
2024-11-03 14:43:23 +08:00
Jack Moran
1a7ebfc8f0
Create SECURITY.md
* Create SECURITY.md

Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>

PR #21589
2024-11-02 22:03:38 +02:00
sledgehammer999
0771970627
Merge pull request #21613 from sledgehammer999/webui_color_switcher
WebUI: Add color scheme switcher
2024-11-02 16:30:01 +02:00
Vladimir Golovnev
0f18e80154
Fix .torrent file could not be deleted when torrent is canceled
PR #21735.
Closes #21723.
2024-11-02 16:41:05 +03:00
Vladimir Golovnev
08b51fc869
Remove trackers from previous category when moved to new one
PR #21717.
Closes #21637.
2024-11-02 16:40:27 +03:00
sledgehammer999
13e3192444
Reorder code to match UI 2024-11-02 13:11:05 +02:00
sledgehammer999
3aefc16c57
Webui: Add color scheme switcher
Closes #21600
2024-11-02 13:11:05 +02:00
sledgehammer999
7b0b3a1522
Merge pull request #21722 from sledgehammer999/changelog_upkeep
Changelog upkeep
2024-11-01 21:48:12 +02:00
Thomas Piccirello
8991d994c2
WebUI: Eliminate unnecessary torrents table updates
Only update the torrents table when torrents are added, edited, or removed.

PR #21656.
2024-11-01 04:34:17 +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
Chocobo1
7af6ac18aa
Merge pull request #21658 from Chocobo1/ssl_setup
Simplify SSL parameters setup
2024-11-01 04:03:51 +08:00
sledgehammer999
41236d8e58
Consolidate all the Changelog entries into master 2024-10-30 22:50:46 +02:00
sledgehammer999
03dfd983d0
Add new version in Changelog
Closes #21718
2024-10-30 22:50:26 +02:00
Vladimir Golovnev
84d895231c
Correctly delete the moved search tab
PR #21687.
Closes #21675.
2024-10-28 09:41:09 +03:00
Vladimir Golovnev
91b2687032
WebAPI: Prevent producing empty sync data
PR #21688.
2024-10-28 09:40:13 +03:00
Thomas Piccirello
be3eefd8de
WebUI: Fix displaying RSS panel on load
The required JS may not yet be loaded, resulting in an error when calling `window.qBittorrent.Rss.init()`.

Signed-off-by: Thomas Piccirello <thomas@piccirello.com>

PR #21689.
2024-10-28 14:06:52 +08:00
Thomas Piccirello
e0e61ffd02
WebUI: Support auto resizing table columns
Auto resize can be triggered by:
1. Double clicking the column's resize handle (its rightmost edge)
2. The table header's context menu

Closes #21627.
PR #21655.
2024-10-28 13:59:13 +08:00