1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-21 20:27:45 +00:00
astra/launcher/ui/Settings/ProfilesPage.qml

49 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 org.kde.kirigamiaddons.formcard as FormCard
import zone.xiv.astra
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
onClicked: applicationWindow().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: {
applicationWindow().currentSetupProfile = LauncherCore.profileManager.addProfile()
applicationWindow().checkSetup()
}
}
}
}