mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-21 20:27:45 +00:00
The windows should properly close when necessary, and the setup can no longer loop itself because it didn't re-read the game version. You can now select another profile's game installation when setting up a new profile.
50 lines
No EOL
1.3 KiB
QML
50 lines
No EOL
1.3 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.Window
|
|
|
|
import org.kde.kirigami as Kirigami
|
|
import org.kde.kirigamiaddons.formcard as FormCard
|
|
|
|
import zone.xiv.astra
|
|
|
|
FormCard.FormCardPage {
|
|
id: page
|
|
|
|
title: i18nc("@title:window", "Profiles")
|
|
|
|
FormCard.FormCard {
|
|
Layout.fillWidth: true
|
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
|
|
|
Repeater {
|
|
model: LauncherCore.profileManager
|
|
|
|
FormCard.FormButtonDelegate {
|
|
required property var profile
|
|
|
|
text: profile.name
|
|
onClicked: page.Window.window.pageStack.layers.push(Qt.createComponent("zone.xiv.astra", "ProfileSettings"), {
|
|
profile: profile
|
|
})
|
|
}
|
|
}
|
|
|
|
FormCard.FormDelegateSeparator {
|
|
below: addProfileButton
|
|
}
|
|
|
|
FormCard.FormButtonDelegate {
|
|
id: addProfileButton
|
|
|
|
text: i18n("Add Profile")
|
|
icon.name: "list-add"
|
|
onClicked: {
|
|
page.Window.window.close();
|
|
LauncherCore.currentProfile = LauncherCore.profileManager.addProfile();
|
|
}
|
|
}
|
|
}
|
|
} |