mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
5b3ecea4a0
commit
b92c2d280c
3 changed files with 10 additions and 12 deletions
|
@ -46,7 +46,7 @@ Item {
|
||||||
|
|
||||||
Controls.Label {
|
Controls.Label {
|
||||||
text: qsTr("Email")
|
text: qsTr("Email")
|
||||||
visible: !prefs.showPin
|
visible: PrefCloudStorage.cloud_verification_status !== CloudStatus.CS_NEED_TO_VERIFY
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
color: subsurfaceTheme.secondaryTextColor
|
color: subsurfaceTheme.secondaryTextColor
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ Item {
|
||||||
Controls.TextField {
|
Controls.TextField {
|
||||||
id: login
|
id: login
|
||||||
text: PrefCloudStorage.cloud_storage_email
|
text: PrefCloudStorage.cloud_storage_email
|
||||||
visible: !prefs.showPin
|
visible: PrefCloudStorage.cloud_verification_status !== CloudStatus.CS_NEED_TO_VERIFY
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
inputMethodHints: Qt.ImhEmailCharactersOnly |
|
inputMethodHints: Qt.ImhEmailCharactersOnly |
|
||||||
Qt.ImhNoAutoUppercase
|
Qt.ImhNoAutoUppercase
|
||||||
|
@ -62,7 +62,7 @@ Item {
|
||||||
|
|
||||||
Controls.Label {
|
Controls.Label {
|
||||||
text: qsTr("Password")
|
text: qsTr("Password")
|
||||||
visible: !prefs.showPin
|
visible: PrefCloudStorage.cloud_verification_status !== CloudStatus.CS_NEED_TO_VERIFY
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
color: subsurfaceTheme.secondaryTextColor
|
color: subsurfaceTheme.secondaryTextColor
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ Item {
|
||||||
Controls.TextField {
|
Controls.TextField {
|
||||||
id: password
|
id: password
|
||||||
text: PrefCloudStorage.cloud_storage_password
|
text: PrefCloudStorage.cloud_storage_password
|
||||||
visible: !prefs.showPin
|
visible: PrefCloudStorage.cloud_verification_status !== CloudStatus.CS_NEED_TO_VERIFY
|
||||||
echoMode: TextInput.PasswordEchoOnEdit
|
echoMode: TextInput.PasswordEchoOnEdit
|
||||||
inputMethodHints: Qt.ImhSensitiveData |
|
inputMethodHints: Qt.ImhSensitiveData |
|
||||||
Qt.ImhHiddenText |
|
Qt.ImhHiddenText |
|
||||||
|
@ -80,20 +80,20 @@ Item {
|
||||||
|
|
||||||
Controls.Label {
|
Controls.Label {
|
||||||
text: qsTr("PIN")
|
text: qsTr("PIN")
|
||||||
visible: prefs.showPin
|
visible: PrefCloudStorage.cloud_verification_status === CloudStatus.CS_NEED_TO_VERIFY
|
||||||
}
|
}
|
||||||
Controls.TextField {
|
Controls.TextField {
|
||||||
id: pin
|
id: pin
|
||||||
text: ""
|
text: ""
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
visible: prefs.showPin
|
visible: PrefCloudStorage.cloud_verification_status === CloudStatus.CS_NEED_TO_VERIFY
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.margins: Kirigami.Units.smallSpacing
|
Layout.margins: Kirigami.Units.smallSpacing
|
||||||
spacing: Kirigami.Units.smallSpacing
|
spacing: Kirigami.Units.smallSpacing
|
||||||
visible: prefs.showPin
|
visible: PrefCloudStorage.cloud_verification_status === CloudStatus.CS_NEED_TO_VERIFY
|
||||||
SsrfButton {
|
SsrfButton {
|
||||||
id: registerpin
|
id: registerpin
|
||||||
text: qsTr("Register")
|
text: qsTr("Register")
|
||||||
|
@ -111,7 +111,6 @@ Item {
|
||||||
onClicked: {
|
onClicked: {
|
||||||
PrefCloudStorage.cloud_verification_status = CloudStatus.CS_UNKNOWN
|
PrefCloudStorage.cloud_verification_status = CloudStatus.CS_UNKNOWN
|
||||||
manager.startPageText = qsTr("Check credentials...");
|
manager.startPageText = qsTr("Check credentials...");
|
||||||
prefs.showPin = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -120,7 +119,7 @@ Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.margins: Kirigami.Units.smallSpacing
|
Layout.margins: Kirigami.Units.smallSpacing
|
||||||
spacing: Kirigami.Units.smallSpacing
|
spacing: Kirigami.Units.smallSpacing
|
||||||
visible: !prefs.showPin
|
visible: PrefCloudStorage.cloud_verification_status !== CloudStatus.CS_NEED_TO_VERIFY
|
||||||
|
|
||||||
SsrfButton {
|
SsrfButton {
|
||||||
id: signin_register_normal
|
id: signin_register_normal
|
||||||
|
|
|
@ -56,7 +56,6 @@ Kirigami.ScrollablePage {
|
||||||
onClicked: {
|
onClicked: {
|
||||||
PrefCloudStorage.cloud_verification_status = CloudStatus.CS_UNKNOWN
|
PrefCloudStorage.cloud_verification_status = CloudStatus.CS_UNKNOWN
|
||||||
manager.startPageText = qsTr("Starting...");
|
manager.startPageText = qsTr("Starting...");
|
||||||
prefs.showPin = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Controls.Label {
|
Controls.Label {
|
||||||
|
|
|
@ -27,7 +27,7 @@ Kirigami.ScrollablePage {
|
||||||
}
|
}
|
||||||
Controls.Label {
|
Controls.Label {
|
||||||
id: explanationTextBasic
|
id: explanationTextBasic
|
||||||
visible: !prefs.showPin
|
visible: PrefCloudStorage.cloud_verification_status !== CloudStatus.CS_NEED_TO_VERIFY
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.margins: Kirigami.Units.gridUnit
|
Layout.margins: Kirigami.Units.gridUnit
|
||||||
Layout.topMargin: Kirigami.Units.gridUnit * 3
|
Layout.topMargin: Kirigami.Units.gridUnit * 3
|
||||||
|
@ -40,7 +40,7 @@ Kirigami.ScrollablePage {
|
||||||
}
|
}
|
||||||
Controls.Label {
|
Controls.Label {
|
||||||
id: explanationTextPin
|
id: explanationTextPin
|
||||||
visible: prefs.showPin
|
visible: PrefCloudStorage.cloud_verification_status === CloudStatus.CS_NEED_TO_VERIFY
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.margins: Kirigami.Units.gridUnit
|
Layout.margins: Kirigami.Units.gridUnit
|
||||||
Layout.topMargin: Kirigami.Units.gridUnit * 3
|
Layout.topMargin: Kirigami.Units.gridUnit * 3
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue