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
|
2018-09-27 20:09:26 +00:00
|
|
|
import org.kde.kirigami 2.4 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
|
2018-02-16 10:17:20 +00:00
|
|
|
background: Rectangle { color: subsurfaceTheme.backgroundColor }
|
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 " +
|
2018-04-09 16:34:47 +00:00
|
|
|
"the no cloud button above.")
|
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-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 " +
|
2018-06-18 08:53:08 +00:00
|
|
|
"at our user forum \(https://subsurface-divelog.org/user-forum/\).<br/><br/>").arg(prefs.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
|
|
|
}
|