From 8e67876ac320d56f66454f349e595c7092f0c9d3 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 18 Dec 2018 16:28:49 -0800 Subject: [PATCH] adding files for staging login --- .../resources/qml/LoginDialog/LinkAccountBody.qml | 13 ++++++------- .../resources/qml/LoginDialog/LoggingInBody.qml | 1 + interface/src/ui/LoginDialog.cpp | 5 +++++ interface/src/ui/LoginDialog.h | 3 +++ 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 6edc2d5c61..681e677c81 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -39,6 +39,7 @@ Item { property bool withSteam: false property bool linkSteam: linkSteam property bool withOculus: false + property bool linkOculus: linkOculus property string errorString: errorString property bool lostFocus: false @@ -370,7 +371,6 @@ Item { lightboxPopup.visible = false; } lightboxPopup.visible = true; - // bodyLoader.setSource("CantAccessBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader }); } } HifiControlsUit.Button { @@ -408,11 +408,10 @@ Item { continueButton.visible = false; return; } - // if (loginDialog.isOculusStoreRunning()) { - // continueButton.text = qsTr("CONTINUE WITH OCULUS"); - // continueButton.buttonGlyph = hifi.glyphs.oculus; - // } else - if (loginDialog.isSteamRunning()) { + if (loginDialog.isOculusStoreRunning()) { + continueButton.text = qsTr("CONTINUE WITH OCULUS"); + continueButton.buttonGlyph = hifi.glyphs.oculus; + } else if (loginDialog.isSteamRunning()) { continueButton.text = qsTr("CONTINUE WITH STEAM"); continueButton.buttonGlyph = hifi.glyphs.steamSquare; } else { @@ -425,7 +424,7 @@ Item { id: signUpContainer width: loginContainer.width height: signUpTextMetrics.height - visible: !linkAccountBody.linkSteam + visible: !linkAccountBody.linkSteam && !linkAccountBody.linkOculus anchors { left: loginContainer.left top: loginContainer.bottom diff --git a/interface/resources/qml/LoginDialog/LoggingInBody.qml b/interface/resources/qml/LoginDialog/LoggingInBody.qml index 355f89667b..fe307c91fc 100644 --- a/interface/resources/qml/LoginDialog/LoggingInBody.qml +++ b/interface/resources/qml/LoginDialog/LoggingInBody.qml @@ -29,6 +29,7 @@ Item { property bool withSteam: withSteam property bool withOculus: withOculus property bool linkSteam: linkSteam + property bool linkOculus: linkOculus QtObject { id: d diff --git a/interface/src/ui/LoginDialog.cpp b/interface/src/ui/LoginDialog.cpp index b343d2a1ad..8e510a286a 100644 --- a/interface/src/ui/LoginDialog.cpp +++ b/interface/src/ui/LoginDialog.cpp @@ -121,6 +121,11 @@ void LoginDialog::login(const QString& username, const QString& password) const DependencyManager::get()->requestAccessToken(username, password); } +void LoginDialog::loginThroughOculus() { + qDebug() << "Attempting to login through Oculus"; + +} + void LoginDialog::loginThroughSteam() { qDebug() << "Attempting to login through Steam"; if (auto steamClient = PluginManager::getInstance()->getSteamClientPlugin()) { diff --git a/interface/src/ui/LoginDialog.h b/interface/src/ui/LoginDialog.h index 2714d654bf..40e8d798ef 100644 --- a/interface/src/ui/LoginDialog.h +++ b/interface/src/ui/LoginDialog.h @@ -73,6 +73,9 @@ protected slots: Q_INVOKABLE void loginThroughSteam(); Q_INVOKABLE void linkSteam(); Q_INVOKABLE void createAccountFromSteam(QString username = QString()); + Q_INVOKABLE void loginThroughOculus(); + //Q_INVOKABLE void linkOculus(); + //Q_INVOKABLE void createAccountFromOculus(QString username = QString()); Q_INVOKABLE void signup(const QString& email, const QString& username, const QString& password);