@@ -20,7 +20,7 @@ import Ubuntu.Components 1.3
2020Item {
2121 property string password: ""
2222 readonly property int passwordScore: scorePassword(password)
23− property bool matching: false
23+ property var matching
2424
2525 function scorePassword(pass) {
2626 var score = 0;
@@ -82,9 +82,14 @@ Item {
8282 }
8383 wrapMode: Text.Wrap
8484 text: {
85− if (matching)
86− return i18n.tr("Passwords match");
87− else if (passwordScore > 80)
85+ if (matching !== undefined) {
86+ if (matching)
87+ return i18n.tr("Passwords match");
88+ else if (!matching)
89+ return i18n.tr("Passwords do not match");
90+ }
91+
92+ if (passwordScore > 80)
8893 return i18n.tr("Strong password");
8994 else if (passwordScore > 60)
9095 return i18n.tr("Fair password");