1
0
Fork 0
mirror of synced 2024-06-16 17:44:44 +12:00
Commit graph

23 commits

Author SHA1 Message Date
loathingKernel 8dbce8e9f2
Rare: rename icon function to qta_icon 2024-02-21 13:30:41 +02:00
loathingKernel 88b6e91530 BrowserLogin: Add dedicated application mode to Rare for the webview login page
Add a sub-application to Rare to launch the webview for logging into EGS.
The sub-application operates similatly to the `laucher` sub-application and
it is autonomous. After a successful login in returns the exchange code
to the standard output to be parsed and used by the login dialog.

The reason this implementation was chosen is because when pywebview uses
pyqtwebengine as the GUI library, we cannot launch it through Rare as
it tries to spawn a QMainWindow inside an existing event loop, which is
prohibited by Qt.

Despite that, EGS login page doesn't work correctly with QtWebEngine,
so on linux default to the GTK backend for pywebview, and this change
helps keeping applications using different toolkits separate.

At this moment, spawning the sub-application blocks the execution of the
main application.

This change should make it easier to authenticate through Rare inside
a gamescope session, such as the steam deck.
2024-02-12 21:51:42 +02:00
loathingKernel 8e1a3c8c73
LoginDialog: Calculate a fixed height for the login stack based on width
* Properly find row to insert sid_edit into
* Use lazy evaluation for logging
* Clean the login forms by using separate layouts for the interactive fields
2023-12-12 01:23:17 +02:00
loathingKernel 0ec80e5678
LoginDialog: Set minimum size in a way that avoids resizing on changing widgets
The forms were updated to be more informative and easier to read.

NOTE: The reason the form is bigger than the contents is because the
QLabels have word-wrapping enabled and as such they substitute width
for height (`hasHeightforWidth`)
2023-12-12 01:23:16 +02:00
loathingKernel 5938835249 ExtraWidgets: Remove IndicatorLineEdit and PathEdit and update imports 2023-02-18 17:29:41 +02:00
loathingKernel ecc1bd8d5c IndicatorLineEdit: Run edit callback function asynchronously
Execute the edit callback function in a thread. By executing it in a thread
we don't have to wait for longer validation procedures to finish to
continue updating the UI. This is most notable in the MoveGamePopUp
which is heavy on disk IO.

Because we cannot use special text formatting in a thread, the
indicator messages have been reworked while also becoming extensible.

A dictionary of extended reasons can be specified through the
`IndicatorLineEdit.extend_reasons()` method.

The dictionary has to follow the following format
```
python
{
	MyIndicatorReasons.REASON: self.tr("Reason message")
	MyIndicatorReasons.OTHER_REASON: self.tr("Other reason message")
}
```

In the above example `MyIndicatorReasons` is a subclass of `IndicatorReasons`
which should be specified as follows

```
python
MyIndicatorReasons(IndicatorReasons):
	REASON = auto()
	OTHER_REASON = auto()
```
2023-02-18 14:37:37 +02:00
loathingKernel fb708ce5fd LoginDialog: Update to legendary 0.20.28 2022-09-01 18:53:16 +03:00
loathingKernel 3ecbae0564 Utils: Rename utils.py to misc.py to not confuse PyCharm checker 2022-08-02 10:42:38 +03:00
loathingKernel 7dbe414b87 Pass edited files through black 2022-06-23 18:05:04 +03:00
loathingKernel 145bc5f540 Use SlidingStackedWidget for the login dialog.
Also fixes the login window missing dialog type hints for the window manager.

Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
2022-06-23 17:57:29 +03:00
Dummerle d077e2bc24
Add pre_launch settings 2022-03-21 23:00:33 +01:00
aznd 7deb4152ac
Implement logging in via webengine (#160)
Add webview as optional dependency, to login from there, to not have to copy SID manually
2022-01-30 00:23:37 +01:00
Dummerle 25c04d2812
Add Reasons to IndicatorLineEdit as tooltip 2022-01-24 16:56:14 +01:00
Dummerle 662c8ed04c
Add link text to browser login 2022-01-23 01:03:56 +01:00
Stelios Tsampas 8f89eb6e88
Rare: pass through Black formatter 2021-12-27 00:37:13 +01:00
Dummerle c9b9ab6814 Fix some typing errors for python 3.8 2021-10-10 22:08:31 +02:00
Stelios Tsampas 463443796d Adjust BrowserLogin to use IndicatorLineEdit
Adjust Locale in `LegendarySettings` to use `IndicatorLineEdit`
Adjust `InstallDialog` to conform with new `PathEdit` `edit_func` specification

This commit temporarily removes `EGLSync` from `LegendarySettings`
as it is being worked on.
2021-10-10 20:47:26 +03:00
Dummerle 6ba445158d Remove login successful page and auto parse sid 2021-10-07 21:58:50 +02:00
Dummerle d11cc7abf3 add legendary submodule and rename custom_legendary to legendary in imports 2021-09-06 21:10:18 +02:00
Dummerle 4cfe2bf336 merge branches 2021-08-16 22:50:31 +02:00
Stelios Tsampas 1365b36b08 Delegate opening browser to a function (futureproofing) 2021-06-24 20:08:22 +03:00
Stelios Tsampas 90ac9a1574 Re-implement LoginDialog. 2021-06-24 20:07:18 +03:00
BuildTools 665083c5b5 lowercase snake case 2021-04-07 22:39:23 +02:00
Renamed from Rare/Components/Dialogs/Login/BrowserLogin.py (Browse further)