@@ -57,26 +57,37 @@ Showable {
58 onRequiredChanged: {
58 onRequiredChanged: {
59 if (required && pinPadLoader.item) {
59 if (required && pinPadLoader.item) {
60− pinPadLoader.item.clear(false);
60+ clear(false)
64+ function forceDelay(delay) {
65+ forcedDelayTimer.interval = delay
66+ forcedDelayTimer.start()
64 function reset() {
69 function reset() {
65 // This causes the loader below to destry and recreate the source
70 // This causes the loader below to destry and recreate the source
66 pinPadLoader.resetting = true;
71 pinPadLoader.resetting = true;
67 pinPadLoader.resetting = false;
72 pinPadLoader.resetting = false;
73+ pinPadLoader.waiting = false
70 function clear(showAnimation) {
76 function clear(showAnimation) {
71 if (pinPadLoader.item) {
77 if (pinPadLoader.item) {
72 pinPadLoader.item.clear(showAnimation);
78 pinPadLoader.item.clear(showAnimation);
80+ pinPadLoader.waiting = false
76 function showInfoPopup(title, text) {
83 function showInfoPopup(title, text) {
77 PopupUtils.open(infoPopupComponent, root, {title: title, text: text})
84 PopupUtils.open(infoPopupComponent, root, {title: title, text: text})
80 Rectangle {
91 Rectangle {
81 // In case background fails to load or is undefined
92 // In case background fails to load or is undefined
82 id: backgroundBackup
93 id: backgroundBackup
@@ -106,6 +117,19 @@ Showable {
106 bottom: pinPadLoader.top
117 bottom: pinPadLoader.top
107 bottomMargin: units.gu(2)
118 bottomMargin: units.gu(2)
122+ objectName: "delayTextLabel"
127+ text: i18n.tr("Too many incorrect attempts, please wait")
128+ horizontalAlignment: Text.AlignHCenter
131+ visible: forcedDelayTimer.running
110 objectName: "retryCountLabel"
134 objectName: "retryCountLabel"
111 anchors {
135 anchors {
@@ -145,6 +169,7 @@ Showable {
145 verticalCenterOffset: root.alphaNumeric ? -units.gu(10) : -units.gu(4)
169 verticalCenterOffset: root.alphaNumeric ? -units.gu(10) : -units.gu(4)
147 property bool resetting: false
171 property bool resetting: false
172+ property bool waiting: false
149 source: (!resetting && root.required) ? (root.alphaNumeric ? "PassphraseLockscreen.qml" : "PinLockscreen.qml") : ""
174 source: (!resetting && root.required) ? (root.alphaNumeric ? "PassphraseLockscreen.qml" : "PinLockscreen.qml") : ""
@@ -152,6 +177,7 @@ Showable {
152 target: pinPadLoader.item
177 target: pinPadLoader.item
154 onEntered: {
179 onEntered: {
180+ pinPadLoader.waiting = true
155 root.entered(passphrase);
181 root.entered(passphrase);
@@ -185,6 +211,11 @@ Showable {
185 property: "username"
211 property: "username"
186 value: root.username
212 value: root.username
215+ target: pinPadLoader.item
216+ property: "entryEnabled"
217+ value: !pinPadLoader.waiting && !forcedDelayTimer.running