1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-23 12:57:45 +00:00
astra/launcher/ui/Setup/AccountSetup.qml
Joshua Goins 3e8e0acaae Remove Sapphire support
I never really used this feature in Astra, and now that Kawari can
perform the login process for you (and just point it towards a Sapphire
server) I don't see a reason to support it anymore.
2025-03-17 19:40:27 -04:00

78 lines
2 KiB
QML

// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
// SPDX-License-Identifier: GPL-3.0-or-later
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Layouts
import org.kde.kirigami as Kirigami
import org.kde.kirigamiaddons.formcard as FormCard
import zone.xiv.astra
FormCard.FormCardPage {
id: page
property var profile
title: i18n("Account Setup")
FormCard.FormCard {
Layout.topMargin: Kirigami.Units.largeSpacing
Layout.fillWidth: true
FormCard.FormTextDelegate {
id: helpTextDelegate
text: i18n("Select an account to use for '%1'.", LauncherCore.currentProfile.config.name)
}
}
FormCard.FormHeader {
title: i18n("Existing Accounts")
visible: LauncherCore.accountManager.hasAnyAccounts()
}
FormCard.FormCard {
visible: LauncherCore.accountManager.hasAnyAccounts()
Layout.fillWidth: true
Repeater {
model: LauncherCore.accountManager
FormCard.FormButtonDelegate {
required property var account
text: account.config.name
onClicked: {
page.profile.account = account
applicationWindow().checkSetup()
}
}
}
}
FormCard.FormHeader {
title: i18n("Add Account")
visible: LauncherCore.accountManager.hasAnyAccounts()
}
FormCard.FormCard {
Layout.topMargin: Kirigami.Units.largeSpacing
Layout.fillWidth: true
FormCard.FormButtonDelegate {
id: addSquareEnixButton
text: i18n("Square Enix Account…")
description: i18n("Used for logging into the official game servers.")
icon.name: "list-add-symbolic"
onClicked: page.Window.window.pageStack.layers.push(Qt.createComponent("zone.xiv.astra", "AddSquareEnix"), {
profile: page.profile
})
}
}
}