Unity 8
DelayedLockscreen.qml
1 /*
2  * Copyright (C) 2013,2014 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 Ubuntu.Components 1.3
19 import "../Components"
20 
21 Item {
22  id: root
23 
24  property int delayMinutes
25  property bool alphaNumeric
26 
27  signal entered(string passphrase) // unused
28  signal cancel() // unused
29 
30  function clear(playAnimation) {}
31 
32  Column {
33  anchors.left: parent.left
34  anchors.right: parent.right
35  anchors.leftMargin: units.gu(4)
36  anchors.rightMargin: units.gu(4)
37  anchors.verticalCenter: parent.verticalCenter
38  spacing: units.gu(2)
39 
40  Label {
41  id: deviceLockedLabel
42  objectName: "deviceLockedLabel"
43  anchors.left: parent.left
44  anchors.right: parent.right
45  horizontalAlignment: Text.AlignHCenter
46  wrapMode: Text.Wrap
47  fontSize: "x-large"
48  color: "#f3f3e7"
49  text: i18n.tr("Device Locked")
50  }
51 
52  Item { // spacer
53  width: units.gu(1)
54  height: units.gu(1)
55  }
56 
57  Label {
58  anchors.left: parent.left
59  anchors.right: parent.right
60  horizontalAlignment: Text.AlignHCenter
61  wrapMode: Text.Wrap
62  color: "#f3f3e7"
63  text: alphaNumeric ?
64  i18n.tr("You have been locked out due to too many failed passphrase attempts.") :
65  i18n.tr("You have been locked out due to too many failed passcode attempts.")
66  }
67 
68  Label {
69  anchors.left: parent.left
70  anchors.right: parent.right
71  horizontalAlignment: Text.AlignHCenter
72  wrapMode: Text.Wrap
73  color: "#f3f3e7"
74  text: i18n.tr("Please wait %1 minute and then try again…",
75  "Please wait %1 minutes and then try again…",
76  root.delayMinutes).arg(root.delayMinutes)
77  }
78 
79  Item { // spacer
80  width: units.gu(1)
81  height: units.gu(1)
82  }
83 
84  Icon {
85  // It would be nice to use a less network-specific name,
86  // but this is the only lock icon we have.
87  name: "network-secure"
88  color: "#f3f3e7"
89  height: units.gu(4)
90  width: units.gu(4)
91  anchors.horizontalCenter: parent.horizontalCenter
92  }
93  }
94 }