on 436b607 help sign in
unity8/qml/Components/DelayedLockscreen.qml
94 lines 2.9 kB history raw
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 */
17import QtQuick 2.0
18import Ubuntu.Components 0.1
19import "../Components"
21Item {
22 id: root
24 property int delayMinutes
25 property bool alphaNumeric
27 signal entered(string passphrase) // unused
28 signal cancel() // unused
30 function clear(playAnimation) {}
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)
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 }
52 Item { // spacer
53 width: units.gu(1)
54 height: units.gu(1)
55 }
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 }
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 }
79 Item { // spacer
80 width: units.gu(1)
81 height: units.gu(1)
82 }
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 }