aboutsummaryrefslogtreecommitdiff
path: root/wizard
diff options
context:
space:
mode:
authorJaquee <jaquee.monero@gmail.com>2017-08-06 17:48:50 +0200
committerJaquee <jaquee.monero@gmail.com>2017-11-03 16:57:10 +0100
commit0e6028aacf7dc483b75d10a7c2182635c9061655 (patch)
tree04cf2f47a9de77a6467aaf0c7adb9f2cef3f33ed /wizard
parentbcb7bcffdbd86a09fedc17992f42b12840555822 (diff)
downloadmonzero-gui-0e6028aacf7dc483b75d10a7c2182635c9061655.tar.gz
monzero-gui-0e6028aacf7dc483b75d10a7c2182635c9061655.tar.xz
monzero-gui-0e6028aacf7dc483b75d10a7c2182635c9061655.zip
wizard: disable password strenght meter on mobiles
Diffstat (limited to 'wizard')
-rw-r--r--wizard/WizardMain.qml4
-rw-r--r--wizard/WizardPasswordUI.qml30
2 files changed, 21 insertions, 13 deletions
diff --git a/wizard/WizardMain.qml b/wizard/WizardMain.qml
index 194f047a..d5c9eb11 100644
--- a/wizard/WizardMain.qml
+++ b/wizard/WizardMain.qml
@@ -83,6 +83,10 @@ ColumnLayout {
}
function switchPage(next) {
+
+ // Android focus workaround
+ releaseFocus();
+
// save settings for current page;
if (next && typeof pages[currentPage].onPageClosed !== 'undefined') {
if (pages[currentPage].onPageClosed(settings) !== true) {
diff --git a/wizard/WizardPasswordUI.qml b/wizard/WizardPasswordUI.qml
index 0239b6a6..d69197a6 100644
--- a/wizard/WizardPasswordUI.qml
+++ b/wizard/WizardPasswordUI.qml
@@ -42,19 +42,22 @@ ColumnLayout {
wizard.nextButton.enabled = passwordItem.password === retypePasswordItem.password
- // scorePassword returns value from 0 to... lots
- var strength = walletManager.getPasswordStrength(passwordItem.password);
- // consider anything below 10 bits as dire
- strength -= 10
- if (strength < 0)
- strength = 0
- // use a slight parabola to discourage short passwords
- strength = strength ^ 1.2 / 3
- // mapScope does not clamp
- if (strength > 100)
- strength = 100
- // privacyLevel component uses 1..13 scale
- privacyLevel.fillLevel = Utils.mapScope(1, 100, 1, 13, strength)
+ // TODO: password strength meter segfaults on Android.
+ if (!isMobile) {
+ // scorePassword returns value from 0 to... lots
+ var strength = walletManager.getPasswordStrength(passwordItem.password);
+ // consider anything below 10 bits as dire
+ strength -= 10
+ if (strength < 0)
+ strength = 0
+ // use a slight parabola to discourage short passwords
+ strength = strength ^ 1.2 / 3
+ // mapScope does not clamp
+ if (strength > 100)
+ strength = 100
+ // privacyLevel component uses 1..13 scale
+ privacyLevel.fillLevel = Utils.mapScope(1, 100, 1, 13, strength)
+ }
}
function resetFocus() {
@@ -85,6 +88,7 @@ ColumnLayout {
}
PrivacyLevelSmall {
+ visible: !isMobile //TODO: strength meter doesnt work on Android
Layout.topMargin: isMobile ? 20 * scaleRatio : 40 * scaleRatio
Layout.fillWidth: true
id: privacyLevel