@@ -57,26 +57,37 @@ Showable {
5757
5858 onRequiredChanged: {
5959 if (required && pinPadLoader.item) {
60− pinPadLoader.item.clear(false);
60+ clear(false)
6161 }
6262 }
6363
64+ function forceDelay(delay) {
65+ forcedDelayTimer.interval = delay
66+ forcedDelayTimer.start()
67+ }
68+
6469 function reset() {
6570 // This causes the loader below to destry and recreate the source
6671 pinPadLoader.resetting = true;
6772 pinPadLoader.resetting = false;
73+ pinPadLoader.waiting = false
6874 }
6975
7076 function clear(showAnimation) {
7177 if (pinPadLoader.item) {
7278 pinPadLoader.item.clear(showAnimation);
7379 }
80+ pinPadLoader.waiting = false
7481 }
7582
7683 function showInfoPopup(title, text) {
7784 PopupUtils.open(infoPopupComponent, root, {title: title, text: text})
7885 }
7986
87+ Timer {
88+ id: forcedDelayTimer
89+ }
90+
8091 Rectangle {
8192 // In case background fails to load or is undefined
8293 id: backgroundBackup
@@ -106,6 +117,19 @@ Showable {
106117 bottom: pinPadLoader.top
107118 bottomMargin: units.gu(2)
108119 }
120+ Label {
121+ id: delayTextLabel
122+ objectName: "delayTextLabel"
123+ anchors {
124+ left: parent.left
125+ right: parent.right
126+ }
127+ text: i18n.tr("Too many incorrect attempts, please wait")
128+ horizontalAlignment: Text.AlignHCenter
129+ color: "#f3f3e7"
130+ opacity: 0.6
131+ visible: forcedDelayTimer.running
132+ }
109133 Label {
110134 objectName: "retryCountLabel"
111135 anchors {
@@ -145,6 +169,7 @@ Showable {
145169 verticalCenterOffset: root.alphaNumeric ? -units.gu(10) : -units.gu(4)
146170 }
147171 property bool resetting: false
172+ property bool waiting: false
148173
149174 source: (!resetting && root.required) ? (root.alphaNumeric ? "PassphraseLockscreen.qml" : "PinLockscreen.qml") : ""
150175
@@ -152,6 +177,7 @@ Showable {
152177 target: pinPadLoader.item
153178
154179 onEntered: {
180+ pinPadLoader.waiting = true
155181 root.entered(passphrase);
156182 }
157183
@@ -185,6 +211,11 @@ Showable {
185211 property: "username"
186212 value: root.username
187213 }
214+ Binding {
215+ target: pinPadLoader.item
216+ property: "entryEnabled"
217+ value: !pinPadLoader.waiting && !forcedDelayTimer.running
218+ }
188219 }
189220
190221 Column {