Skip to content

Commit 4a13889

Browse files
Better sign in issue panel.
1 parent 07c84ed commit 4a13889

File tree

3 files changed

+23
-7
lines changed

3 files changed

+23
-7
lines changed

data/locale/en-US.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ MarketplaceWindow.Purchased.NoPurchasesSubtitle="Your digital assets from Market
1212
MarketplaceWindow.Purchased.OpenMarketplaceButton="Explore Marketplace"
1313
MarketplaceWindow.LoginNeeded.Title="Sign in to get started"
1414
MarketplaceWindow.LoginNeeded.Subtitle="First off, let's connect your Marketplace account with OBS Studio"
15-
MarketplaceWindow.LoginError.Title="Login error"
16-
MarketplaceWindow.LoginError.Subtitle="There was an error logging you in. Please click the Log In button above to try again."
15+
MarketplaceWindow.LoginError.Title="Sign in"
16+
MarketplaceWindow.LoginError.Subtitle="There was an issue signing you in. Please try signing in again to continue."
1717
MarketplaceWindow.LoggingIn.Title="Signing you in"
1818
MarketplaceWindow.LoggingIn.Subtitle="Please sign in using the browser window that should have appeared. If no browser window appeared, or you accidentally closed it, click below to try again."
1919
MarketplaceWindow.LoggingIn.TryAgain="Try again"

src/elgato-cloud-data.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ void ElgatoCloud::_LoadUserData(bool loadData)
492492
}
493493
} catch (...) {
494494
obs_log(LOG_INFO, "Invalid response from server");
495-
connectionError = true;
495+
loginError = true;
496496
}
497497
}
498498

src/elgato-cloud-window.cpp

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -653,12 +653,14 @@ void ElgatoCloudWindow::on_logOutButton_clicked()
653653
void ElgatoCloudWindow::setLoggedIn()
654654
{
655655
_toolbar->disableLogout(false);
656-
if (elgatoCloud->connectionError) {
657-
_stackedContent->setCurrentIndex(2);
656+
if (elgatoCloud->loginError) {
657+
_stackedContent->setCurrentIndex(4);
658+
} else if (elgatoCloud->connectionError) {
659+
// Connection error shows sign in issue
660+
// for now.
661+
_stackedContent->setCurrentIndex(4);
658662
} else if (elgatoCloud->loggingIn) {
659663
_stackedContent->setCurrentIndex(5);
660-
} else if (elgatoCloud->loginError) {
661-
_stackedContent->setCurrentIndex(4);
662664
} else if (!elgatoCloud->loggedIn) {
663665
_stackedContent->setCurrentIndex(1);
664666
} else if (elgatoCloud->loading) {
@@ -913,9 +915,23 @@ LoginError::LoginError(QWidget *parent) : QWidget(parent)
913915
subHLayout->addWidget(loginSub);
914916
subHLayout->addStretch();
915917

918+
auto hLayout = new QHBoxLayout();
919+
auto loginButton = new QPushButton(this);
920+
loginButton->setText(
921+
obs_module_text("MarketplaceWindow.LoginButton.LogIn"));
922+
loginButton->setStyleSheet(
923+
"QPushButton {font-size: 12pt; border-radius: 8px; padding: 16px; background-color: #232323; border: none; } "
924+
"QPushButton:hover {background-color: #444444; }");
925+
connect(loginButton, &QPushButton::clicked, this,
926+
[this]() { elgatoCloud->StartLogin(); });
927+
hLayout->addStretch();
928+
hLayout->addWidget(loginButton);
929+
hLayout->addStretch();
930+
916931
layout->addStretch();
917932
layout->addWidget(login);
918933
layout->addLayout(subHLayout);
934+
layout->addLayout(hLayout);
919935
layout->addStretch();
920936
layout->setSpacing(16);
921937
}

0 commit comments

Comments
 (0)