mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-24 21:37:46 +00:00
Further page improvements
Fix the header disappearing when cancelling auto-login, set the main window title automatically. Also add a name to the settings window.
This commit is contained in:
parent
7e58b60297
commit
6487e1a725
2 changed files with 9 additions and 7 deletions
|
@ -17,7 +17,7 @@ Kirigami.ApplicationWindow {
|
|||
minimumWidth: 800
|
||||
minimumHeight: 500
|
||||
|
||||
title: "Astra"
|
||||
title: pageStack.currentItem?.title
|
||||
|
||||
property bool checkedAutoLogin: false
|
||||
|
||||
|
@ -44,16 +44,17 @@ Kirigami.ApplicationWindow {
|
|||
return
|
||||
}
|
||||
|
||||
pageStack.layers.clear()
|
||||
pageStack.clear()
|
||||
pageStack.layers.clear();
|
||||
|
||||
if (!LauncherCore.currentProfile.isGameInstalled) {
|
||||
// User must set up the profile
|
||||
pageStack.layers.push(Qt.createComponent("zone.xiv.astra", "SetupPage"), {
|
||||
pageStack.push(Qt.createComponent("zone.xiv.astra", "SetupPage"), {
|
||||
profile: LauncherCore.currentProfile
|
||||
})
|
||||
} else if (!LauncherCore.currentProfile.account) {
|
||||
// User must select an account for the profile
|
||||
pageStack.layers.push(Qt.createComponent("zone.xiv.astra", "AccountSetup"), {
|
||||
pageStack.push(Qt.createComponent("zone.xiv.astra", "AccountSetup"), {
|
||||
profile: LauncherCore.currentProfile
|
||||
})
|
||||
} else {
|
||||
|
@ -61,14 +62,15 @@ Kirigami.ApplicationWindow {
|
|||
pageStack.layers.push(Qt.createComponent("zone.xiv.astra", "AutoLoginPage"))
|
||||
checkedAutoLogin = true;
|
||||
} else {
|
||||
pageStack.replace(Qt.createComponent("zone.xiv.astra", "MainPage"))
|
||||
pageStack.push(Qt.createComponent("zone.xiv.astra", "MainPage"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function cancelAutoLogin() {
|
||||
pageStack.clear();
|
||||
pageStack.layers.clear();
|
||||
pageStack.layers.replace(Qt.createComponent("zone.xiv.astra", "MainPage"));
|
||||
pageStack.push(Qt.createComponent("zone.xiv.astra", "MainPage"));
|
||||
}
|
||||
|
||||
function pushDialogLayer(url) {
|
||||
|
|
|
@ -28,7 +28,7 @@ Kirigami.Page {
|
|||
Kirigami.Action {
|
||||
text: i18nc("@action:button", "Settings")
|
||||
icon.name: "configure"
|
||||
onTriggered: applicationWindow().pushDialogLayer(Qt.createComponent("zone.xiv.astra", "SettingsPage"))
|
||||
onTriggered: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent("zone.xiv.astra", "SettingsPage"), {}, { title: i18nc("@title:window", "Settings") })
|
||||
}
|
||||
]
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue