mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: redo the start page
It now explains the relationship between Subsurface-mobile and the desktop application and allows the user to enter the cloud credentials right there. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ffd449cf21
commit
82a982b903
2 changed files with 17 additions and 41 deletions
|
@ -8,6 +8,7 @@ import org.subsurfacedivelog.mobile 1.0
|
||||||
Item {
|
Item {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: startpage
|
id: startpage
|
||||||
|
width: subsurfaceTheme.columnWidth
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: MobileComponents.Units.gridUnit / 2
|
anchors.margins: MobileComponents.Units.gridUnit / 2
|
||||||
|
|
||||||
|
@ -15,51 +16,31 @@ Item {
|
||||||
|
|
||||||
MobileComponents.Heading {
|
MobileComponents.Heading {
|
||||||
Layout.bottomMargin: MobileComponents.Units.largeSpacing
|
Layout.bottomMargin: MobileComponents.Units.largeSpacing
|
||||||
text: "Subsurface Divelog"
|
text: "Subsurface-mobile"
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileComponents.Label {
|
MobileComponents.Label {
|
||||||
id: welcomeText
|
id: explanationText
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.bottomMargin: MobileComponents.Units.largeSpacing
|
Layout.bottomMargin: MobileComponents.Units.largeSpacing
|
||||||
|
text: "In order to use Subsurface-mobile you need to have a Subsurface cloud storage account " +
|
||||||
|
"(which can be created with the Subsurface desktop application)."
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
}
|
||||||
|
MobileComponents.Label {
|
||||||
|
id: messageArea
|
||||||
|
Layout.fillWidth: true
|
||||||
text: manager.startPageText
|
text: manager.startPageText
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
Layout.columnSpan: 2
|
|
||||||
}
|
|
||||||
SubsurfaceButton {
|
|
||||||
id: cloudstorageButton
|
|
||||||
Layout.bottomMargin: MobileComponents.Units.largeSpacing
|
|
||||||
Layout.preferredWidth: startpage.buttonWidth
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
text: "Connect to CloudStorage..."
|
|
||||||
onClicked: {
|
|
||||||
stackView.push(cloudCredWindow)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
SubsurfaceButton {
|
|
||||||
id: computerButton
|
|
||||||
Layout.preferredWidth: startpage.buttonWidth
|
|
||||||
Layout.bottomMargin: MobileComponents.Units.largeSpacing
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
text: "Transfer from dive computer..."
|
|
||||||
onClicked: {
|
|
||||||
stackView.push(downloadDivesWindow)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
SubsurfaceButton {
|
|
||||||
id: manualButton
|
|
||||||
Layout.preferredWidth: startpage.buttonWidth
|
|
||||||
Layout.bottomMargin: MobileComponents.Units.largeSpacing
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
text: "Add dive manually..."
|
|
||||||
onClicked: {
|
|
||||||
manager.addDive();
|
|
||||||
stackView.push(detailsWindow)
|
|
||||||
}
|
}
|
||||||
|
CloudCredentials {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.margins: MobileComponents.Units.gridUnit
|
||||||
|
Layout.topMargin: MobileComponents.Units.gridUnit * 2
|
||||||
|
visible: true
|
||||||
|
property int headingLevel: 3
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
|
id: spacer
|
||||||
width: parent.width
|
width: parent.width
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
}
|
}
|
||||||
|
|
|
@ -251,11 +251,6 @@ MobileComponents.ApplicationWindow {
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
|
|
||||||
CloudCredentials {
|
|
||||||
id: cloudCredWindow
|
|
||||||
visible: false
|
|
||||||
}
|
|
||||||
|
|
||||||
DiveDetails {
|
DiveDetails {
|
||||||
id: detailsWindow
|
id: detailsWindow
|
||||||
visible: false
|
visible: false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue