mobile UI/login: move startpage to main

StartPage does not belong in divelist.

Remove startPage from diveList and anchor in main.

Make needed functional changes.

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
jan Iversen 2019-12-20 08:16:52 +01:00 committed by Dirk Hohndel
parent 11810d5d06
commit 611c4bb088
3 changed files with 26 additions and 26 deletions

View file

@ -42,8 +42,7 @@ Kirigami.ScrollablePage {
}
}
}
// this will be: onVisibleChanged: {
function simulateVisibleChanged() {
onVisibleChanged: {
console.log("---> DiveList changed visibility to " + visible)
if (visible) {
page.actions.main = page.downloadFromDCAction
@ -402,27 +401,6 @@ Kirigami.ScrollablePage {
}
}
StartPage {
id: startPage
anchors.fill: parent
opacity: (credentialStatus === CloudStatus.CS_NOCLOUD ||
credentialStatus === CloudStatus.CS_VERIFIED) ? 0 : 1
visible: opacity > 0
Behavior on opacity { NumberAnimation { duration: Kirigami.Units.shortDuration } }
onVisibleChanged: {
console.log("---> Startpage changed visibility to " + visible)
if (visible) {
page.actions.main = null
page.actions.right = null
page.actions.left = null
page.title = qsTr("Cloud credentials")
} else {
// This is to be removed when StartPage becomes a proper page
page.simulateVisibleChanged()
}
}
}
Controls.Label {
anchors.fill: parent
horizontalAlignment: Text.AlignHCenter