2023-07-30 08:49:34 -04:00
|
|
|
// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2023-12-17 12:47:13 -05:00
|
|
|
pragma ComponentBehavior: Bound
|
|
|
|
|
2023-09-16 18:15:11 -04:00
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Layouts
|
|
|
|
|
|
|
|
import org.kde.kirigami as Kirigami
|
2023-10-08 20:01:17 -04:00
|
|
|
import org.kde.kirigamiaddons.formcard as FormCard
|
2023-09-16 18:15:11 -04:00
|
|
|
|
|
|
|
import zone.xiv.astra
|
2023-07-30 08:49:34 -04:00
|
|
|
|
2023-10-08 20:01:17 -04:00
|
|
|
FormCard.FormCardPage {
|
2023-07-30 08:49:34 -04:00
|
|
|
id: page
|
|
|
|
|
|
|
|
property var profile
|
|
|
|
|
|
|
|
title: i18n("Account Setup")
|
|
|
|
|
2023-10-08 20:01:17 -04:00
|
|
|
FormCard.FormCard {
|
|
|
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
|
|
|
Layout.fillWidth: true
|
2023-07-30 08:49:34 -04:00
|
|
|
|
2023-10-08 20:01:17 -04:00
|
|
|
FormCard.FormTextDelegate {
|
|
|
|
id: helpTextDelegate
|
2023-07-30 08:49:34 -04:00
|
|
|
|
2024-04-01 14:54:41 -04:00
|
|
|
text: i18n("Select an account to use for '%1'.", LauncherCore.currentProfile.name)
|
2023-10-08 20:01:17 -04:00
|
|
|
}
|
|
|
|
}
|
2023-07-30 08:49:34 -04:00
|
|
|
|
2023-10-08 20:01:17 -04:00
|
|
|
FormCard.FormHeader {
|
|
|
|
title: i18n("Existing Accounts")
|
|
|
|
visible: LauncherCore.accountManager.hasAnyAccounts()
|
|
|
|
}
|
2023-07-30 08:49:34 -04:00
|
|
|
|
2023-10-08 20:01:17 -04:00
|
|
|
FormCard.FormCard {
|
|
|
|
visible: LauncherCore.accountManager.hasAnyAccounts()
|
2023-07-30 08:49:34 -04:00
|
|
|
|
2023-10-08 20:01:17 -04:00
|
|
|
Layout.fillWidth: true
|
2023-07-30 08:49:34 -04:00
|
|
|
|
2023-10-08 20:01:17 -04:00
|
|
|
Repeater {
|
|
|
|
model: LauncherCore.accountManager
|
|
|
|
|
|
|
|
FormCard.FormButtonDelegate {
|
|
|
|
required property var account
|
2023-07-30 08:49:34 -04:00
|
|
|
|
2023-10-08 20:01:17 -04:00
|
|
|
text: account.name
|
|
|
|
|
|
|
|
onClicked: {
|
|
|
|
page.profile.account = account
|
|
|
|
applicationWindow().checkSetup()
|
2023-07-30 08:49:34 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-10-08 20:01:17 -04:00
|
|
|
|
2024-04-01 14:54:41 -04:00
|
|
|
FormCard.FormHeader {
|
2024-05-26 08:18:48 -04:00
|
|
|
title: i18n("Add Account")
|
2024-04-01 14:54:41 -04:00
|
|
|
visible: LauncherCore.accountManager.hasAnyAccounts()
|
|
|
|
}
|
|
|
|
|
2023-10-08 20:01:17 -04:00
|
|
|
FormCard.FormCard {
|
|
|
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
FormCard.FormButtonDelegate {
|
|
|
|
id: addSquareEnixButton
|
|
|
|
|
2024-05-26 08:18:48 -04:00
|
|
|
text: i18n("Square Enix Account…")
|
2024-04-01 14:54:41 -04:00
|
|
|
description: i18n("Used for logging into the official game servers.")
|
2023-10-08 20:01:17 -04:00
|
|
|
icon.name: "list-add-symbolic"
|
2023-12-17 12:47:13 -05:00
|
|
|
onClicked: page.Window.window.pageStack.layers.push(Qt.createComponent("zone.xiv.astra", "AddSquareEnix"), {
|
2023-10-08 20:01:17 -04:00
|
|
|
profile: page.profile
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
FormCard.FormDelegateSeparator {
|
|
|
|
above: addSquareEnixButton
|
|
|
|
below: addSapphireButton
|
|
|
|
}
|
|
|
|
|
|
|
|
FormCard.FormButtonDelegate {
|
|
|
|
id: addSapphireButton
|
|
|
|
|
2024-05-26 08:18:48 -04:00
|
|
|
text: i18n("Sapphire Account…")
|
|
|
|
description: i18n("Only for Sapphire servers, don't select this if unless you need to connect to one.")
|
2023-10-08 20:01:17 -04:00
|
|
|
icon.name: "list-add-symbolic"
|
2023-12-17 12:47:13 -05:00
|
|
|
onClicked: page.Window.window.pageStack.layers.push(Qt.createComponent("zone.xiv.astra", "AddSapphire"), {
|
2023-10-08 20:01:17 -04:00
|
|
|
profile: page.profile
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
2023-07-30 08:49:34 -04:00
|
|
|
}
|