1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-22 04:37:46 +00:00
astra/launcher/ui/Setup/ExistingSetup.qml

77 lines
1.8 KiB
QML
Raw Normal View History

// 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
import QtQuick.Dialogs
2023-09-16 18:15:11 -04:00
import org.kde.kirigami as Kirigami
import org.kde.kirigamiaddons.formcard as FormCard
2023-09-16 18:15:11 -04:00
import zone.xiv.astra
import "../Components"
FormCard.FormCardPage {
id: page
property var profile
title: i18n("Find Existing Installation")
data: FolderDialog {
id: dialog
onAccepted: {
page.profile.config.gamePath = decodeURIComponent(selectedFolder.toString().replace("file://", ""));
applicationWindow().checkSetup();
}
}
FormCard.FormCard {
Layout.fillWidth: true
Layout.topMargin: Kirigami.Units.largeSpacing
Repeater {
model: ExistingInstallModel {}
delegate: FormCard.FormButtonDelegate {
required property var path
required property var type
text: path
description: type
onClicked: {
page.profile.config.gamePath = path;
applicationWindow().checkSetup();
}
}
}
}
FormCard.FormCard {
Layout.fillWidth: true
Layout.topMargin: Kirigami.Units.largeSpacing
FormCard.FormTextDelegate {
id: helpTextDelegate
2024-05-26 08:18:48 -04:00
text: i18n("If you can't find your existing game installation, manually select the folder below.")
}
FormCard.FormDelegateSeparator {
above: helpTextDelegate
below: selectDelegate
}
FormCard.FormButtonDelegate {
id: selectDelegate
icon.name: "document-open-folder"
2024-05-26 08:18:48 -04:00
text: i18n("Select Existing Folder")
onClicked: dialog.open()
}
}
}