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
|
|
|
title: i18n("Home")
|
|
|
|
|
2024-03-19 19:10:30 -04:00
|
|
|
topPadding: 0
|
|
|
|
leftPadding: 0
|
|
|
|
rightPadding: 0
|
2023-10-08 13:21:49 -04:00
|
|
|
bottomPadding: 0
|
2023-07-30 09:14:22 -04:00
|
|
|
|
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"
|
2024-03-28 16:42:52 -04:00
|
|
|
onTriggered: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent("zone.xiv.astra", "SettingsPage"), {}, { title: i18nc("@title:window", "Settings") })
|
2024-03-19 19:10:30 -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
|
|
|
|
2024-03-22 20:41:10 -04:00
|
|
|
spacing: 0
|
2023-10-08 20:24:35 -04:00
|
|
|
|
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
|
2024-03-22 20:41:10 -04:00
|
|
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
2024-03-22 20:53:38 -04:00
|
|
|
Layout.fillHeight: true
|
2024-03-22 20:41:10 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
Kirigami.Separator {
|
|
|
|
Layout.fillHeight: true
|
2024-03-19 19:10:30 -04:00
|
|
|
}
|
|
|
|
|
2023-07-31 19:03:15 -04:00
|
|
|
Loader {
|
2023-10-11 13:25:24 -04:00
|
|
|
active: LauncherCore.settings.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
|
2024-03-22 20:41:10 -04:00
|
|
|
height: Math.max(scrollView.availableHeight, page.height, implicitHeight)
|
2023-07-31 19:03:15 -04:00
|
|
|
}
|
2023-07-30 09:14:22 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|