2017-04-27 18:30:36 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2017-10-29 07:44:06 +00:00
|
|
|
import QtQuick 2.6
|
2017-10-30 10:26:47 +00:00
|
|
|
import QtQuick.Layouts 1.2
|
2017-10-29 12:44:22 +00:00
|
|
|
import QtQuick.Controls 2.2 as Controls
|
QML UI: Kirigami to 2.2
When first tested this commit, especially the dive list was looking
terrible. However, after including newer SHA's from libkirigami, and
correcting lots of spacing/margin issue, a retest of this commit shows
no strange artifact any more, and the amount of warnings in the log
output is reduced significantly. So now, it appears save to
upgrade.
Notice that main.qml still uses Kirigami 2.0. and is not updated in
this commit. With version 2.2, there is a new way of theming, that
is not (yet) compatible with our current code. Blindly upgrading to
2.2 leads to a almost black dive list, wrong button colors, and
runtime errors in the log, due to the fact the direct setting from
QML Kirigami's Theme colors is not allowed any more.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-14 19:13:01 +00:00
|
|
|
import org.kde.kirigami 2.2 as Kirigami
|
2016-01-20 06:32:37 +00:00
|
|
|
import org.subsurfacedivelog.mobile 1.0
|
2015-11-07 00:45:40 +00:00
|
|
|
|
2017-04-03 12:08:00 +00:00
|
|
|
|
|
|
|
Kirigami.ScrollablePage {
|
2016-02-11 14:59:10 +00:00
|
|
|
id: startpage
|
2015-11-07 00:45:40 +00:00
|
|
|
|
2016-02-14 05:09:33 +00:00
|
|
|
function saveCredentials() { cloudCredentials.saveCredentials() }
|
|
|
|
|
2017-04-03 12:08:00 +00:00
|
|
|
ColumnLayout {
|
QML UI: rework single credential page to two pages
This commit tries to implement most of issue #515. It reworks the
one credential page, which its dynamic PIN part, into two pages.
Main driver of selecting one of the two pages is the showPin
boolean. Page 1 contains the email/passwd field (and the
option to use a no cloud setup). Page 2 only contains the PIN
part (and the option to cancel the process).
The Kirigami central button does not seem very handy here. We
need, for example, a cancel, sign-in and register, only register,
etc. buttons, which are not easy to handle in specific icons.
Therefore, normal pushbuttons are chosen to deal with user
interaction, and the Kirigami button is removed from these
pages.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-09-27 17:11:23 +00:00
|
|
|
CloudCredentials {
|
|
|
|
id: cloudCredentials
|
2017-04-03 12:08:00 +00:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.margins: Kirigami.Units.gridUnit
|
QML UI: rework single credential page to two pages
This commit tries to implement most of issue #515. It reworks the
one credential page, which its dynamic PIN part, into two pages.
Main driver of selecting one of the two pages is the showPin
boolean. Page 1 contains the email/passwd field (and the
option to use a no cloud setup). Page 2 only contains the PIN
part (and the option to cancel the process).
The Kirigami central button does not seem very handy here. We
need, for example, a cancel, sign-in and register, only register,
etc. buttons, which are not easy to handle in specific icons.
Therefore, normal pushbuttons are chosen to deal with user
interaction, and the Kirigami button is removed from these
pages.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-09-27 17:11:23 +00:00
|
|
|
Layout.topMargin: 0
|
|
|
|
property int headingLevel: 3
|
2017-04-03 12:08:00 +00:00
|
|
|
}
|
2017-10-12 12:25:22 +00:00
|
|
|
Controls.Label {
|
2017-04-03 12:08:00 +00:00
|
|
|
id: messageArea
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.margins: Kirigami.Units.gridUnit
|
|
|
|
Layout.topMargin: 0
|
|
|
|
text: manager.startPageText
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
}
|
2017-10-12 12:25:22 +00:00
|
|
|
Controls.Label {
|
QML UI: rework single credential page to two pages
This commit tries to implement most of issue #515. It reworks the
one credential page, which its dynamic PIN part, into two pages.
Main driver of selecting one of the two pages is the showPin
boolean. Page 1 contains the email/passwd field (and the
option to use a no cloud setup). Page 2 only contains the PIN
part (and the option to cancel the process).
The Kirigami central button does not seem very handy here. We
need, for example, a cancel, sign-in and register, only register,
etc. buttons, which are not easy to handle in specific icons.
Therefore, normal pushbuttons are chosen to deal with user
interaction, and the Kirigami button is removed from these
pages.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-09-27 17:11:23 +00:00
|
|
|
id: explanationTextBasic
|
|
|
|
visible: !showPin
|
2017-04-03 12:08:00 +00:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.margins: Kirigami.Units.gridUnit
|
QML UI: rework single credential page to two pages
This commit tries to implement most of issue #515. It reworks the
one credential page, which its dynamic PIN part, into two pages.
Main driver of selecting one of the two pages is the showPin
boolean. Page 1 contains the email/passwd field (and the
option to use a no cloud setup). Page 2 only contains the PIN
part (and the option to cancel the process).
The Kirigami central button does not seem very handy here. We
need, for example, a cancel, sign-in and register, only register,
etc. buttons, which are not easy to handle in specific icons.
Therefore, normal pushbuttons are chosen to deal with user
interaction, and the Kirigami button is removed from these
pages.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-09-27 17:11:23 +00:00
|
|
|
Layout.topMargin: Kirigami.Units.gridUnit * 3
|
2017-09-29 07:15:43 +00:00
|
|
|
text: qsTr("To use Subsurface-mobile with Subsurface cloud storage, please enter your cloud credentials.<br/><br/>" +
|
|
|
|
"If this is the first time you use Subsurface cloud storage, enter a valid email (all lower case) " +
|
|
|
|
"and a password of your choice (letters and numbers).<br/><br/>" +
|
|
|
|
"To use Subsurface-mobile only with local data on this device, select " +
|
QML UI: rework single credential page to two pages
This commit tries to implement most of issue #515. It reworks the
one credential page, which its dynamic PIN part, into two pages.
Main driver of selecting one of the two pages is the showPin
boolean. Page 1 contains the email/passwd field (and the
option to use a no cloud setup). Page 2 only contains the PIN
part (and the option to cancel the process).
The Kirigami central button does not seem very handy here. We
need, for example, a cancel, sign-in and register, only register,
etc. buttons, which are not easy to handle in specific icons.
Therefore, normal pushbuttons are chosen to deal with user
interaction, and the Kirigami button is removed from these
pages.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-09-27 17:11:23 +00:00
|
|
|
"the no cloud buttton above.")
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
}
|
2017-10-12 12:25:22 +00:00
|
|
|
Controls.Label {
|
QML UI: rework single credential page to two pages
This commit tries to implement most of issue #515. It reworks the
one credential page, which its dynamic PIN part, into two pages.
Main driver of selecting one of the two pages is the showPin
boolean. Page 1 contains the email/passwd field (and the
option to use a no cloud setup). Page 2 only contains the PIN
part (and the option to cancel the process).
The Kirigami central button does not seem very handy here. We
need, for example, a cancel, sign-in and register, only register,
etc. buttons, which are not easy to handle in specific icons.
Therefore, normal pushbuttons are chosen to deal with user
interaction, and the Kirigami button is removed from these
pages.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-09-27 17:11:23 +00:00
|
|
|
id: explanationTextPin
|
|
|
|
visible: showPin
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.margins: Kirigami.Units.gridUnit
|
|
|
|
Layout.topMargin: Kirigami.Units.gridUnit * 3
|
2017-09-29 07:15:43 +00:00
|
|
|
text: qsTr("Thank you for registering with Subsurface. We sent <b>%1</b>" +
|
|
|
|
" a PIN code to complete the registration. " +
|
|
|
|
"If you do not receive an email from us within 15 minutes, please check " +
|
|
|
|
"the correct spelling of your email address and your spam box first.<br/><br/>" +
|
|
|
|
"In case of any problems regarding cloud account setup, please contact us " +
|
|
|
|
"at our user forum \(https://subsurface-divelog.org/user-forum/\).<br/><br/>").arg(manager.cloudUserName)
|
QML UI: rework single credential page to two pages
This commit tries to implement most of issue #515. It reworks the
one credential page, which its dynamic PIN part, into two pages.
Main driver of selecting one of the two pages is the showPin
boolean. Page 1 contains the email/passwd field (and the
option to use a no cloud setup). Page 2 only contains the PIN
part (and the option to cancel the process).
The Kirigami central button does not seem very handy here. We
need, for example, a cancel, sign-in and register, only register,
etc. buttons, which are not easy to handle in specific icons.
Therefore, normal pushbuttons are chosen to deal with user
interaction, and the Kirigami button is removed from these
pages.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-09-27 17:11:23 +00:00
|
|
|
wrapMode: Text.WordWrap
|
2017-04-03 12:08:00 +00:00
|
|
|
}
|
2017-07-20 17:39:55 +00:00
|
|
|
Item { width: Kirigami.Units.gridUnit; height: 3 * Kirigami.Units.gridUnit}
|
2015-11-07 00:45:40 +00:00
|
|
|
}
|
2015-12-03 22:06:52 +00:00
|
|
|
}
|