1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-20 19:57:45 +00:00
astra/launcher/ui/Setup/ExistingSetup.qml
Joshua Goins 67dcd90058 Overhaul initial setup flow, again
This improves the flow drastically, first by porting it from MobileForm
to FormCard. Next, it fixes some of the annoying bugs such as the
profile not switching properly when adding a new profile. Selecting an
existing game path is now possible, and it's less likely you can enter
in invalid account credentials. The overall look and behavior of some
of the pages is improved.
2023-10-08 20:01:17 -04:00

54 lines
No EOL
1.2 KiB
QML

// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
// SPDX-License-Identifier: GPL-3.0-or-later
import QtQuick
import QtQuick.Layouts
import QtQuick.Dialogs
import org.kde.kirigami as Kirigami
import org.kde.kirigamiaddons.formcard as FormCard
import zone.xiv.astra
import "../Components"
FormCard.FormCardPage {
id: page
property var profile
title: i18n("Find Existing Installation")
FormCard.FormCard {
Layout.topMargin: Kirigami.Units.largeSpacing
Layout.fillWidth: true
FormCard.FormTextDelegate {
id: helpTextDelegate
text: i18n("Please select the path to your existing installation.")
}
FormCard.FormDelegateSeparator {
above: helpTextDelegate
below: selectDelegate
}
FormCard.FormButtonDelegate {
id: selectDelegate
text: i18n("Select Existing Path")
icon.name: "document-open-folder"
onClicked: dialog.open()
}
}
data: FolderDialog {
id: dialog
onAccepted: {
page.profile.gamePath = decodeURIComponent(selectedFolder.toString().replace("file://", ""));
applicationWindow().checkSetup();
}
}
}