1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-20 03:37:47 +00:00

Actually return to the main page if a login error occurs in auto-login

This commit is contained in:
Joshua Goins 2025-02-01 09:58:38 -05:00
parent 788918e4b8
commit e3709a4dd1
2 changed files with 9 additions and 5 deletions

View file

@ -393,6 +393,7 @@ QCoro::Task<bool> SquareEnixLogin::registerSession()
std::string bodyStd = body.toStdString();
const bool hasPatched = co_await m_patcher->patch(physis_parse_patchlist(PatchListType::Game, bodyStd.c_str()));
m_patcher->deleteLater();
qInfo() << hasPatched;
if (!hasPatched) {
co_return false;
}

View file

@ -2,12 +2,15 @@
// SPDX-License-Identifier: GPL-3.0-or-later
import QtQuick
import QtQuick.Window
import org.kde.kirigami as Kirigami
import zone.xiv.astra
Kirigami.Page {
id: root
property var gameInstaller
title: i18n("Logging in...")
@ -34,8 +37,8 @@ Kirigami.Page {
showCloseButton: false
standardButtons: Kirigami.Dialog.Ok
onAccepted: applicationWindow().pageStack.layers.pop()
onRejected: applicationWindow().pageStack.layers.pop()
onAccepted: applicationWindow().checkSetup()
onRejected: applicationWindow().checkSetup()
}
Kirigami.PromptDialog {
@ -47,9 +50,9 @@ Kirigami.Page {
onAccepted: {
LauncherCore.currentProfile.dalamudEnabled = false;
applicationWindow().pageStack.layers.pop()
applicationWindow().checkSetup();
}
onRejected: applicationWindow().pageStack.layers.pop()
onRejected: applicationWindow().checkSetup()
}
Connections {
@ -88,4 +91,4 @@ Kirigami.Page {
dalamudErrorDialog.open();
}
}
}
}