1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-21 20:27:45 +00:00
astra/launcher/ui/Settings/AccountsPage.qml
Joshua Goins 1cbfc17c1a Improve profile/account creation and deletion experience
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.
2023-09-20 16:44:43 -04:00

68 lines
No EOL
1.9 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 org.kde.kirigamiaddons.components as Components
import zone.xiv.astra
FormCard.FormCardPage {
id: root
title: i18nc("@title:window", "Accounts")
FormCard.FormCard {
Layout.fillWidth: true
Layout.topMargin: Kirigami.Units.largeSpacing
Repeater {
model: LauncherCore.accountManager
FormCard.FormButtonDelegate {
required property var account
text: account.name
leading: Components.Avatar {
source: account.avatarUrl
}
leadingPadding: Kirigami.Units.largeSpacing * 2
onClicked: root.Window.window.pageStack.layers.push(Qt.createComponent("zone.xiv.astra", "AccountSettings"), {
account: account
})
}
}
FormCard.FormDelegateSeparator {
below: addSquareEnixButton
}
FormCard.FormButtonDelegate {
id: addSquareEnixButton
text: i18n("Add Square Enix Account")
icon.name: "list-add-symbolic"
onClicked: root.Window.window.pageStack.layers.push(Qt.createComponent("zone.xiv.astra", "AddSquareEnix"))
}
FormCard.FormDelegateSeparator {
above: addSquareEnixButton
below: addSapphireButton
}
FormCard.FormButtonDelegate {
id: addSapphireButton
text: i18n("Add Sapphire Account")
icon.name: "list-add-symbolic"
onClicked: root.Window.window.pageStack.layers.push(Qt.createComponent("zone.xiv.astra", "AddSapphire"))
}
}
}