1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-20 11:47:46 +00:00
astra/launcher/ui/Settings/AccountsPage.qml

66 lines
1.8 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.kirigami as Kirigami
import org.kde.kirigamiaddons.formcard as FormCard
2023-09-16 17:32:38 -04:00
import org.kde.kirigamiaddons.components as Components
2023-09-16 18:15:11 -04:00
import zone.xiv.astra
2023-08-19 10:49:00 -04:00
FormCard.FormCardPage {
FormCard.FormHeader {
title: i18n("Accounts")
}
FormCard.FormCard {
Layout.fillWidth: true
Repeater {
model: LauncherCore.accountManager
FormCard.FormButtonDelegate {
required property var account
text: account.name
2023-09-16 18:15:11 -04:00
leading: Components.Avatar {
2023-08-19 10:49:00 -04:00
source: account.avatarUrl
}
leadingPadding: Kirigami.Units.largeSpacing * 2
2023-09-16 17:41:51 -04:00
onClicked: applicationWindow().pageStack.layers.push(Qt.createComponent("zone.xiv.astra", "AccountSettings"), {
2023-08-19 10:49:00 -04:00
account: account
})
}
}
FormCard.FormDelegateSeparator {
below: addSquareEnixButton
}
FormCard.FormButtonDelegate {
id: addSquareEnixButton
text: i18n("Add Square Enix Account")
icon.name: "list-add-symbolic"
2023-09-16 17:41:51 -04:00
onClicked: pageStack.layers.push(Qt.createComponent("zone.xiv.astra", "AddSquareEnix"))
2023-08-19 10:49:00 -04:00
}
FormCard.FormDelegateSeparator {
above: addSquareEnixButton
below: addSapphireButton
}
FormCard.FormButtonDelegate {
id: addSapphireButton
text: i18n("Add Sapphire Account")
icon.name: "list-add-symbolic"
2023-09-16 17:41:51 -04:00
onClicked: pageStack.layers.push(Qt.createComponent("zone.xiv.astra", "AddSapphire"))
2023-08-19 10:49:00 -04:00
}
}
}