Lomiri
DelayedLockscreen.qml
1 /*
2  * Copyright (C) 2013-2016 Canonical Ltd.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; version 3.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 import QtQuick 2.4
18 import Lomiri.Components 1.3
19 
20 Item {
21  id: root
22 
23  property int delayMinutes
24  property bool alphaNumeric
25 
26  Column {
27  anchors.left: parent.left
28  anchors.right: parent.right
29  anchors.leftMargin: units.gu(4)
30  anchors.rightMargin: units.gu(4)
31  anchors.verticalCenter: parent.verticalCenter
32  spacing: units.gu(2)
33 
34  Label {
35  id: deviceLockedLabel
36  objectName: "deviceLockedLabel"
37  anchors.left: parent.left
38  anchors.right: parent.right
39  horizontalAlignment: Text.AlignHCenter
40  wrapMode: Text.Wrap
41  fontSize: "x-large"
42  color: "white"
43  text: i18n.tr("Device Locked")
44  }
45 
46  Item { // spacer
47  width: units.gu(1)
48  height: units.gu(1)
49  }
50 
51  Label {
52  anchors.left: parent.left
53  anchors.right: parent.right
54  horizontalAlignment: Text.AlignHCenter
55  wrapMode: Text.Wrap
56  color: "white"
57  text: alphaNumeric ?
58  i18n.tr("You have been locked out due to too many failed passphrase attempts.") :
59  i18n.tr("You have been locked out due to too many failed passcode attempts.")
60  }
61 
62  Label {
63  anchors.left: parent.left
64  anchors.right: parent.right
65  horizontalAlignment: Text.AlignHCenter
66  wrapMode: Text.Wrap
67  color: "white"
68  text: i18n.tr("Please wait %1 minute and then try again…",
69  "Please wait %1 minutes and then try again…",
70  root.delayMinutes).arg(root.delayMinutes)
71  }
72 
73  Item { // spacer
74  width: units.gu(1)
75  height: units.gu(1)
76  }
77 
78  Icon {
79  name: "lock"
80  color: "white"
81  height: units.gu(4)
82  width: units.gu(4)
83  anchors.horizontalCenter: parent.horizontalCenter
84  }
85  }
86 }