1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-22 12:47:44 +00:00
astra/launcher/ui/Settings/ProfilesPage.qml

49 lines
1.2 KiB
QML
Raw Normal View History

2023-08-19 10:49:00 -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
import org.kde.kirigamiaddons.formcard as FormCard
import zone.xiv.astra
2023-08-19 10:49:00 -04:00
FormCard.FormCardPage {
title: i18n("General")
FormCard.FormHeader {
title: i18n("Profiles")
}
FormCard.FormCard {
Layout.fillWidth: true
Repeater {
model: LauncherCore.profileManager
FormCard.FormButtonDelegate {
required property var profile
text: profile.name
2023-09-16 17:41:51 -04:00
onClicked: applicationWindow().pageStack.layers.push(Qt.createComponent("zone.xiv.astra", "ProfileSettings"), {
2023-08-19 10:49:00 -04:00
profile: profile
})
}
}
FormCard.FormDelegateSeparator {
below: addProfileButton
}
FormCard.FormButtonDelegate {
id: addProfileButton
text: i18n("Add Profile")
icon.name: "list-add"
onClicked: {
applicationWindow().currentSetupProfile = LauncherCore.profileManager.addProfile()
applicationWindow().checkSetup()
}
}
}
}