2023-07-30 09:14:22 -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.Controls as QQC2
|
|
|
|
import QtQuick.Layouts
|
|
|
|
|
|
|
|
import org.kde.kirigami as Kirigami
|
|
|
|
|
|
|
|
import zone.xiv.astra
|
2023-07-30 09:14:22 -04:00
|
|
|
|
|
|
|
Kirigami.Page {
|
|
|
|
id: page
|
|
|
|
|
2023-07-31 19:03:15 -04:00
|
|
|
padding: 0
|
|
|
|
|
|
|
|
title: i18n("Home")
|
|
|
|
|
2023-09-16 17:32:38 -04:00
|
|
|
actions: [
|
|
|
|
Kirigami.Action {
|
|
|
|
text: i18n("Tools")
|
|
|
|
icon.name: "tools-symbolic"
|
2023-07-31 19:03:15 -04:00
|
|
|
|
2023-09-16 17:32:38 -04:00
|
|
|
Kirigami.Action {
|
|
|
|
text: i18n("Open Official Launcher")
|
|
|
|
icon.name: "application-x-executable"
|
|
|
|
onTriggered: LauncherCore.openOfficialLauncher(loginPage.profile)
|
|
|
|
}
|
2023-07-31 19:03:15 -04:00
|
|
|
|
2023-09-16 17:32:38 -04:00
|
|
|
Kirigami.Action {
|
|
|
|
text: i18n("Open System Info")
|
|
|
|
icon.name: "application-x-executable"
|
|
|
|
onTriggered: LauncherCore.openSystemInfo(loginPage.profile)
|
|
|
|
}
|
2023-07-31 19:03:15 -04:00
|
|
|
|
2023-09-16 17:32:38 -04:00
|
|
|
Kirigami.Action {
|
|
|
|
text: i18n("Open Config Backup")
|
|
|
|
icon.name: "application-x-executable"
|
|
|
|
onTriggered: LauncherCore.openConfigBackup(loginPage.profile)
|
|
|
|
}
|
|
|
|
},
|
2023-07-31 19:03:15 -04:00
|
|
|
Kirigami.Action {
|
2023-09-16 17:32:38 -04:00
|
|
|
text: i18n("Server Status")
|
|
|
|
icon.name: "cloudstatus"
|
|
|
|
onTriggered: applicationWindow().openUrl('https://na.finalfantasyxiv.com/lodestone/worldstatus/')
|
|
|
|
},
|
2023-07-31 19:03:15 -04:00
|
|
|
Kirigami.Action {
|
2023-09-16 17:32:38 -04:00
|
|
|
text: i18n("Settings")
|
|
|
|
icon.name: "configure"
|
2023-09-16 17:41:51 -04:00
|
|
|
onTriggered: applicationWindow().pushDialogLayer(Qt.createComponent("zone.xiv.astra", "SettingsPage"))
|
2023-07-31 19:03:15 -04:00
|
|
|
}
|
2023-09-16 17:32:38 -04:00
|
|
|
]
|
2023-07-30 09:14:22 -04:00
|
|
|
|
|
|
|
RowLayout {
|
2023-07-31 19:03:15 -04:00
|
|
|
anchors.fill: parent
|
2023-07-30 09:14:22 -04:00
|
|
|
|
2023-07-31 19:03:15 -04:00
|
|
|
Loader {
|
|
|
|
active: LauncherCore.showNews
|
2023-07-30 09:14:22 -04:00
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
|
2023-09-16 18:15:11 -04:00
|
|
|
sourceComponent: QQC2.ScrollView {
|
2023-07-31 19:03:15 -04:00
|
|
|
id: scrollView
|
|
|
|
|
|
|
|
NewsPage {
|
|
|
|
width: scrollView.availableWidth
|
|
|
|
height: scrollView.availableHeight
|
|
|
|
}
|
2023-07-30 09:14:22 -04:00
|
|
|
}
|
|
|
|
}
|
2023-07-31 19:03:15 -04:00
|
|
|
|
2023-07-30 09:14:22 -04:00
|
|
|
LoginPage {
|
2023-07-31 19:03:15 -04:00
|
|
|
id: loginPage
|
|
|
|
|
|
|
|
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
|
2023-08-18 21:36:06 -04:00
|
|
|
Layout.minimumWidth: LauncherCore.showNews ? Kirigami.Units.gridUnit * 25 : 0
|
|
|
|
Layout.fillWidth: !LauncherCore.showNews
|
2023-07-30 09:14:22 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|