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

70 lines
1.8 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
title: i18n("Home")
2024-03-19 19:10:30 -04:00
topPadding: 0
leftPadding: 0
rightPadding: 0
bottomPadding: 0
2024-03-19 19:10:30 -04:00
actions: [
Kirigami.Action {
text: i18nc("@action:button", "Server Status")
icon.name: "cloudstatus"
onTriggered: applicationWindow().openUrl('https://na.finalfantasyxiv.com/lodestone/worldstatus/')
},
Kirigami.Action {
text: i18nc("@action:button", "Settings")
icon.name: "configure"
onTriggered: applicationWindow().pushDialogLayer(Qt.createComponent("zone.xiv.astra", "SettingsPage"))
}
]
RowLayout {
anchors.fill: parent
spacing: 0
2024-03-19 19:10:30 -04:00
LoginPage {
id: loginPage
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
Layout.minimumWidth: LauncherCore.settings.showNews ? Kirigami.Units.gridUnit * 26 : 0
Layout.fillWidth: !LauncherCore.settings.showNews
Layout.topMargin: Kirigami.Units.largeSpacing
Layout.fillHeight: true
}
Kirigami.Separator {
Layout.fillHeight: true
2024-03-19 19:10:30 -04:00
}
Loader {
active: LauncherCore.settings.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: Math.max(scrollView.availableHeight, page.height, implicitHeight)
}
}
}
}
}