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

81 lines
2.2 KiB
QML
Raw Normal View History

// 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
Kirigami.Page {
id: page
padding: 0
title: i18n("Home")
2023-09-16 17:32:38 -04:00
actions: [
Kirigami.Action {
text: i18n("Tools")
icon.name: "tools-symbolic"
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-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-09-16 17:32:38 -04:00
Kirigami.Action {
text: i18n("Open Config Backup")
icon.name: "application-x-executable"
onTriggered: LauncherCore.openConfigBackup(loginPage.profile)
}
},
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/')
},
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-09-16 17:32:38 -04:00
]
RowLayout {
anchors.fill: parent
Loader {
active: LauncherCore.showNews
Layout.fillWidth: true
Layout.fillHeight: true
2023-09-16 18:15:11 -04:00
sourceComponent: QQC2.ScrollView {
id: scrollView
NewsPage {
width: scrollView.availableWidth
height: scrollView.availableHeight
}
}
}
LoginPage {
id: loginPage
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
Layout.minimumWidth: LauncherCore.showNews ? Kirigami.Units.gridUnit * 25 : 0
Layout.fillWidth: !LauncherCore.showNews
}
}
}