diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-05-09 23:31:00 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-05-09 23:33:03 +0200 |
commit | 7b1fa60cc6c74a53de0af636fa8f4f06caf87fa0 (patch) | |
tree | 30a2b6247c7b7be8c03995d0474f87df7019bb29 /src/LoginPage.h | |
parent | Improve Login and Register page hinting (diff) | |
download | nheko-7b1fa60cc6c74a53de0af636fa8f4f06caf87fa0.tar.xz |
Add SSO
closes #94
Diffstat (limited to 'src/LoginPage.h')
-rw-r--r-- | src/LoginPage.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/LoginPage.h b/src/LoginPage.h index 4b84abfc..8a402aea 100644 --- a/src/LoginPage.h +++ b/src/LoginPage.h @@ -38,6 +38,12 @@ class LoginPage : public QWidget Q_OBJECT public: + enum class LoginMethod + { + Password, + SSO, + }; + LoginPage(QWidget *parent = nullptr); void reset(); @@ -50,7 +56,7 @@ signals: //! Used to trigger the corresponding slot outside of the main thread. void versionErrorCb(const QString &err); void loginErrorCb(const QString &err); - void versionOkCb(); + void versionOkCb(LoginPage::LoginMethod method); void loginOk(const mtx::responses::Login &res); @@ -77,7 +83,7 @@ private slots: // Callback for errors produced during server probing void versionError(const QString &error_message); // Callback for successful server probing - void versionOk(); + void versionOk(LoginPage::LoginMethod method); private: bool isMatrixIdValid(); @@ -123,4 +129,5 @@ private: TextField *password_input_; TextField *deviceName_; TextField *serverInput_; + LoginMethod loginMethod = LoginMethod::Password; }; |