mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-25 13:57:45 +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
|
minimumWidth: 800
|
||||||
minimumHeight: 500
|
minimumHeight: 500
|
||||||
|
|
||||||
title: "Astra"
|
title: pageStack.currentItem?.title
|
||||||
|
|
||||||
property bool checkedAutoLogin: false
|
property bool checkedAutoLogin: false
|
||||||
|
|
||||||
|
@ -44,16 +44,17 @@ Kirigami.ApplicationWindow {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
pageStack.layers.clear()
|
pageStack.clear()
|
||||||
|
pageStack.layers.clear();
|
||||||
|
|
||||||
if (!LauncherCore.currentProfile.isGameInstalled) {
|
if (!LauncherCore.currentProfile.isGameInstalled) {
|
||||||
// User must set up the profile
|
// 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
|
profile: LauncherCore.currentProfile
|
||||||
})
|
})
|
||||||
} else if (!LauncherCore.currentProfile.account) {
|
} else if (!LauncherCore.currentProfile.account) {
|
||||||
// User must select an account for the profile
|
// 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
|
profile: LauncherCore.currentProfile
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
@ -61,14 +62,15 @@ Kirigami.ApplicationWindow {
|
||||||
pageStack.layers.push(Qt.createComponent("zone.xiv.astra", "AutoLoginPage"))
|
pageStack.layers.push(Qt.createComponent("zone.xiv.astra", "AutoLoginPage"))
|
||||||
checkedAutoLogin = true;
|
checkedAutoLogin = true;
|
||||||
} else {
|
} else {
|
||||||
pageStack.replace(Qt.createComponent("zone.xiv.astra", "MainPage"))
|
pageStack.push(Qt.createComponent("zone.xiv.astra", "MainPage"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function cancelAutoLogin() {
|
function cancelAutoLogin() {
|
||||||
|
pageStack.clear();
|
||||||
pageStack.layers.clear();
|
pageStack.layers.clear();
|
||||||
pageStack.layers.replace(Qt.createComponent("zone.xiv.astra", "MainPage"));
|
pageStack.push(Qt.createComponent("zone.xiv.astra", "MainPage"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function pushDialogLayer(url) {
|
function pushDialogLayer(url) {
|
||||||
|
|
|
@ -28,7 +28,7 @@ Kirigami.Page {
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
text: i18nc("@action:button", "Settings")
|
text: i18nc("@action:button", "Settings")
|
||||||
icon.name: "configure"
|
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