aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/CloudCredentials.qml
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2019-12-29 09:13:08 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-29 12:20:19 -0800
commitb92c2d280cddff8a5f0fa53bafa8d57cb52f4603 (patch)
treeb848fffc7d8d4d2f9faaebcf88202097c67aa944 /mobile-widgets/qml/CloudCredentials.qml
parent5b3ecea4a0b9bd0f65d78592fb923d5270286354 (diff)
downloadsubsurface-b92c2d280cddff8a5f0fa53bafa8d57cb52f4603.tar.gz
mobile-widgets/qml: remove prefs.showPin
prefs.showpin is the same as PrefCloudStorage.cloud_verification_status === CloudStatus.CS_NEED_TO_VERIFY but is actually implemented as a separate variable. Removing showPin in order to limit use of QMLPrefs, which is the overall goal. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml/CloudCredentials.qml')
-rw-r--r--mobile-widgets/qml/CloudCredentials.qml17
1 files changed, 8 insertions, 9 deletions
diff --git a/mobile-widgets/qml/CloudCredentials.qml b/mobile-widgets/qml/CloudCredentials.qml
index 6bed7b1f7..1b999f4a5 100644
--- a/mobile-widgets/qml/CloudCredentials.qml
+++ b/mobile-widgets/qml/CloudCredentials.qml
@@ -46,7 +46,7 @@ Item {
Controls.Label {
text: qsTr("Email")
- visible: !prefs.showPin
+ visible: PrefCloudStorage.cloud_verification_status !== CloudStatus.CS_NEED_TO_VERIFY
font.pointSize: subsurfaceTheme.smallPointSize
color: subsurfaceTheme.secondaryTextColor
}
@@ -54,7 +54,7 @@ Item {
Controls.TextField {
id: login
text: PrefCloudStorage.cloud_storage_email
- visible: !prefs.showPin
+ visible: PrefCloudStorage.cloud_verification_status !== CloudStatus.CS_NEED_TO_VERIFY
Layout.fillWidth: true
inputMethodHints: Qt.ImhEmailCharactersOnly |
Qt.ImhNoAutoUppercase
@@ -62,7 +62,7 @@ Item {
Controls.Label {
text: qsTr("Password")
- visible: !prefs.showPin
+ visible: PrefCloudStorage.cloud_verification_status !== CloudStatus.CS_NEED_TO_VERIFY
font.pointSize: subsurfaceTheme.smallPointSize
color: subsurfaceTheme.secondaryTextColor
}
@@ -70,7 +70,7 @@ Item {
Controls.TextField {
id: password
text: PrefCloudStorage.cloud_storage_password
- visible: !prefs.showPin
+ visible: PrefCloudStorage.cloud_verification_status !== CloudStatus.CS_NEED_TO_VERIFY
echoMode: TextInput.PasswordEchoOnEdit
inputMethodHints: Qt.ImhSensitiveData |
Qt.ImhHiddenText |
@@ -80,20 +80,20 @@ Item {
Controls.Label {
text: qsTr("PIN")
- visible: prefs.showPin
+ visible: PrefCloudStorage.cloud_verification_status === CloudStatus.CS_NEED_TO_VERIFY
}
Controls.TextField {
id: pin
text: ""
Layout.fillWidth: true
- visible: prefs.showPin
+ visible: PrefCloudStorage.cloud_verification_status === CloudStatus.CS_NEED_TO_VERIFY
}
RowLayout {
Layout.fillWidth: true
Layout.margins: Kirigami.Units.smallSpacing
spacing: Kirigami.Units.smallSpacing
- visible: prefs.showPin
+ visible: PrefCloudStorage.cloud_verification_status === CloudStatus.CS_NEED_TO_VERIFY
SsrfButton {
id: registerpin
text: qsTr("Register")
@@ -111,7 +111,6 @@ Item {
onClicked: {
PrefCloudStorage.cloud_verification_status = CloudStatus.CS_UNKNOWN
manager.startPageText = qsTr("Check credentials...");
- prefs.showPin = false;
}
}
}
@@ -120,7 +119,7 @@ Item {
Layout.fillWidth: true
Layout.margins: Kirigami.Units.smallSpacing
spacing: Kirigami.Units.smallSpacing
- visible: !prefs.showPin
+ visible: PrefCloudStorage.cloud_verification_status !== CloudStatus.CS_NEED_TO_VERIFY
SsrfButton {
id: signin_register_normal