2023-07-30 08:49:34 -04:00
|
|
|
// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2023-09-16 18:15:11 -04:00
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Layouts
|
2023-10-08 20:01:17 -04:00
|
|
|
import QtQuick.Dialogs
|
2023-09-16 18:15:11 -04:00
|
|
|
|
|
|
|
import org.kde.kirigami as Kirigami
|
2023-10-08 20:01:17 -04:00
|
|
|
import org.kde.kirigamiaddons.formcard as FormCard
|
2023-09-16 18:15:11 -04:00
|
|
|
|
|
|
|
import zone.xiv.astra
|
2023-07-30 08:49:34 -04:00
|
|
|
|
2023-10-08 20:01:17 -04:00
|
|
|
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();
|
2023-07-30 08:49:34 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|